public interface ChronicleQueueBuilder<B extends ChronicleQueueBuilder> extends Cloneable
Modifier and Type | Method and Description |
---|---|
long |
blockSize() |
B |
blockSize(int blockSize) |
long |
bufferCapacity() |
B |
bufferCapacity(long bufferCapacity) |
boolean |
buffered()
Deprecated.
Use writeBufferMode
|
B |
buffered(boolean isBuffered)
Deprecated.
Use writeBufferMode
|
ChronicleQueue |
build() |
CycleCalculator |
cycleCalculator() |
long |
epoch() |
B |
epoch(long epoch)
Deprecated.
|
net.openhft.chronicle.core.threads.EventLoop |
eventLoop() |
B |
eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop) |
int |
indexCount() |
B |
indexCount(int indexCount) |
int |
indexSpacing() |
B |
indexSpacing(int indexSpacing) |
Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> |
onRingBufferStats() |
B |
onRingBufferStats(Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats) |
File |
path() |
boolean |
progressOnContention() |
B |
progressOnContention(boolean progressOnContention)
Setting this to true enables new functionality whereby opening the DocumentContext to write to a chronicle
will make only one (very cheap) attempt to grab the header so as to lock the queue for appending.
|
BufferMode |
readBufferMode() |
B |
readBufferMode(BufferMode readBufferMode) |
boolean |
readOnly() |
B |
readOnly(boolean readOnly) |
RollCycle |
rollCycle() |
B |
rollCycle(RollCycle rollCycle) |
B |
rollTime(LocalTime time,
ZoneId zoneId)
Resets the rollTime for the queue cycle to a new time.
|
static SingleChronicleQueueBuilder |
single(File basePath) |
static SingleChronicleQueueBuilder |
single(String basePath) |
static SingleChronicleQueueBuilder |
singleText(String basePath)
Deprecated.
|
WireStoreFactory |
storeFactory() |
StoreFileListener |
storeFileListener() |
B |
storeFileListener(StoreFileListener storeFileListener) |
default B |
testBlockSize()
THIS IS FOR TESTING ONLY.
|
net.openhft.chronicle.wire.WireType |
wireType() |
B |
wireType(net.openhft.chronicle.wire.WireType wireType) |
BufferMode |
writeBufferMode() |
B |
writeBufferMode(BufferMode writeBufferMode) |
static SingleChronicleQueueBuilder single(@NotNull String basePath)
static SingleChronicleQueueBuilder single(@NotNull File basePath)
@Deprecated static SingleChronicleQueueBuilder singleText(@NotNull String basePath)
@NotNull ChronicleQueue build()
@NotNull B onRingBufferStats(@NotNull Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats)
@NotNull Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats()
@NotNull File path()
@NotNull B blockSize(int blockSize)
@NotNull default B testBlockSize()
Using this will be slower when you have many messages, and break when you have large messages.
long blockSize()
@NotNull B wireType(@NotNull net.openhft.chronicle.wire.WireType wireType)
@NotNull net.openhft.chronicle.wire.WireType wireType()
@NotNull @Deprecated B epoch(long epoch)
This method is deprecated and will be removed in a future release.
Please use the rollTime
method, specifying the new epoch as a
LocalTime
that will be resolved against UTC.
epoch
- a value in UTC millis that will be used when resolving roll cycle times.long epoch()
B rollTime(@NotNull LocalTime time, ZoneId zoneId)
E.g. builder.rollTime(LocalTime.of(21, 0), ZoneId.of("UTC")) will cause the queue to roll cycles at 21:00 UTC, rather than the default roll-time of midnight UTC.
time
- the new value for the time of day when the cycle should rollzoneId
- the time-zone against which to base the roll-time@NotNull RollCycle rollCycle()
@NotNull @Deprecated B buffered(boolean isBuffered)
@Deprecated boolean buffered()
@NotNull B bufferCapacity(long bufferCapacity)
bufferCapacity
- to use when buffering enabled.long bufferCapacity()
B writeBufferMode(BufferMode writeBufferMode)
writeBufferMode
- to use for writes. Only None is available in OSS@NotNull BufferMode writeBufferMode()
B readBufferMode(BufferMode readBufferMode)
readBufferMode
- to use for read. Only None is available in OSSBufferMode readBufferMode()
@NotNull B eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop)
eventLoop
- to use when asynchronous buffering is used.@Nullable net.openhft.chronicle.core.threads.EventLoop eventLoop()
B indexCount(int indexCount)
int indexCount()
B indexSpacing(int indexSpacing)
int indexSpacing()
WireStoreFactory storeFactory()
B storeFileListener(StoreFileListener storeFileListener)
StoreFileListener storeFileListener()
boolean readOnly()
B readOnly(boolean readOnly)
boolean progressOnContention()
B progressOnContention(boolean progressOnContention)
progressOnContention
- leave false (default) for existing behaviourCycleCalculator cycleCalculator()
Copyright © 2018. All rights reserved.