public class SingleChronicleQueueBuilder extends Object implements Cloneable, net.openhft.chronicle.wire.Marshallable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ROLL_CYCLE_PROPERTY |
BufferMode |
readBufferMode |
BufferMode |
writeBufferMode |
Modifier | Constructor and Description |
---|---|
protected |
SingleChronicleQueueBuilder() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
$equals, $fieldInfos, $hashCode, $toString, copyFrom, copyTo, deepCopy, fromFile, fromFile, fromFileAsMap, fromFileAsMap, fromHexString, fromString, fromString, fromString, getClassName, getField, mergeToMap, readMarshallable, reset, setField, streamFromFile, streamFromFile, writeMarshallable
public static final String DEFAULT_ROLL_CYCLE_PROPERTY
public BufferMode writeBufferMode
public BufferMode readBufferMode
public static void addAliases()
public static SingleChronicleQueueBuilder builder()
@NotNull public static SingleChronicleQueueBuilder builder(@NotNull Path path, @NotNull net.openhft.chronicle.wire.WireType wireType)
@NotNull public static SingleChronicleQueueBuilder builder(@NotNull File file, @NotNull net.openhft.chronicle.wire.WireType wireType)
public static SingleChronicleQueueBuilder single()
public static SingleChronicleQueueBuilder single(@NotNull String basePath)
public static SingleChronicleQueueBuilder single(@NotNull File basePath)
public static SingleChronicleQueueBuilder binary(@NotNull Path path)
public static SingleChronicleQueueBuilder binary(@NotNull String basePath)
public static SingleChronicleQueueBuilder binary(@NotNull File basePathFile)
public static SingleChronicleQueueBuilder fieldlessBinary(@NotNull File name)
public static SingleChronicleQueueBuilder defaultZeroBinary(@NotNull File basePathFile)
public static SingleChronicleQueueBuilder deltaBinary(@NotNull File basePathFile)
public static SingleChronicleQueueBuilder deltaBinary(@NotNull File name, byte deltaIntervalShift)
name
- the file namedeltaIntervalShift
- default value of 6, the shift for deltaInterval, the should be a
number between 0-63 ( inclusive ), default the delta messaging is
check pointed every 64 messages, so the default deltaIntervalShift == 6
, as 1 << 6 == 64
public WireStoreFactory storeFactory()
public boolean hasPretouchIntervalMillis()
@NotNull public SingleChronicleQueue build()
public SingleChronicleQueueBuilder aesEncryption(@Nullable byte[] keyBytes)
public net.openhft.chronicle.core.util.Updater<net.openhft.chronicle.bytes.Bytes> messageInitializer()
public Consumer<net.openhft.chronicle.bytes.Bytes> messageHeaderReader()
public SingleChronicleQueueBuilder messageHeader(net.openhft.chronicle.core.util.Updater<net.openhft.chronicle.bytes.Bytes> messageInitializer, Consumer<net.openhft.chronicle.bytes.Bytes> messageHeaderReader)
public SingleChronicleQueueBuilder rollTime(LocalTime rollTime)
public ZoneId rollTimeZone()
public SingleChronicleQueueBuilder rollTimeZone(ZoneId rollTimeZone)
public SingleChronicleQueueBuilder rollTime(@NotNull LocalTime rollTime, ZoneId zoneId)
protected void initializeMetadata()
public SingleChronicleQueueBuilder enablePreloader(long pretouchIntervalMillis)
public int deltaCheckpointInterval()
public QueueOffsetSpec queueOffsetSpec()
public SingleChronicleQueueBuilder maxTailers(int maxTailers)
maxTailers
- number of tailers that will be required from this queue, not including the draining tailerpublic int maxTailers()
public SingleChronicleQueueBuilder bufferBytesStoreCreator(net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> bufferBytesStoreCreator)
@Nullable public net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> bufferBytesStoreCreator()
public long pretouchIntervalMillis()
public SingleChronicleQueueBuilder path(String path)
public SingleChronicleQueueBuilder path(File path)
public SingleChronicleQueueBuilder path(Path path)
public SingleChronicleQueueBuilder onRingBufferStats(@NotNull Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats)
onRingBufferStats
- a consumer of the BytesRingBufferStats@NotNull public Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats()
@NotNull public File path()
public SingleChronicleQueueBuilder blockSize(long blockSize)
public SingleChronicleQueueBuilder blockSize(int blockSize)
public long blockSize()
public SingleChronicleQueueBuilder testBlockSize()
Using this will be slower when you have many messages, and break when you have large messages.
@NotNull public SingleChronicleQueueBuilder wireType(@NotNull net.openhft.chronicle.wire.WireType wireType)
@NotNull public net.openhft.chronicle.wire.WireType wireType()
@NotNull public SingleChronicleQueueBuilder rollCycle(@NotNull RollCycle rollCycle)
@NotNull public RollCycle rollCycle()
public long bufferCapacity()
@NotNull public SingleChronicleQueueBuilder bufferCapacity(long bufferCapacity)
bufferCapacity
- sets the ring buffer capacity in bytes@NotNull public SingleChronicleQueueBuilder epoch(long epoch)
epoch
- sets an epoch offset as the number of number of milliseconds since January 1,
1970, 00:00:00 GMTthis
public long epoch()
@NotNull @Deprecated public SingleChronicleQueueBuilder buffered(boolean isBuffered)
true
. uses a ring buffer to buffer appends, excerpts are written to the
Chronicle Queue using a background threadisBuffered
- true
if the append is buffered@Deprecated public boolean buffered()
@NotNull public BufferMode writeBufferMode()
public SingleChronicleQueueBuilder writeBufferMode(BufferMode writeBufferMode)
public BufferMode readBufferMode()
public SingleChronicleQueueBuilder readBufferMode(BufferMode readBufferMode)
@NotNull public net.openhft.chronicle.core.threads.EventLoop eventLoop()
eventLoop
that was set@NotNull public SingleChronicleQueueBuilder eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop)
public boolean enableRingBufferMonitoring()
public SingleChronicleQueueBuilder enableRingBufferMonitoring(boolean enableRingBufferMonitoring)
public SingleChronicleQueueBuilder indexCount(int indexCount)
public int indexCount()
public SingleChronicleQueueBuilder indexSpacing(int indexSpacing)
public int indexSpacing()
public net.openhft.chronicle.core.time.TimeProvider timeProvider()
public SingleChronicleQueueBuilder timeProvider(net.openhft.chronicle.core.time.TimeProvider timeProvider)
public Supplier<net.openhft.chronicle.threads.TimingPauser> pauserSupplier()
public SingleChronicleQueueBuilder pauserSupplier(Supplier<net.openhft.chronicle.threads.TimingPauser> pauser)
public SingleChronicleQueueBuilder timeoutMS(long timeoutMS)
public long timeoutMS()
public SingleChronicleQueueBuilder storeFileListener(StoreFileListener storeFileListener)
public StoreFileListener storeFileListener()
public SingleChronicleQueueBuilder sourceId(int sourceId)
public int sourceId()
public StoreRecoveryFactory recoverySupplier()
public SingleChronicleQueueBuilder recoverySupplier(StoreRecoveryFactory recoverySupplier)
public boolean readOnly()
public SingleChronicleQueueBuilder readOnly(boolean readOnly)
public Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> encodingSupplier()
public Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> decodingSupplier()
public SingleChronicleQueueBuilder codingSuppliers(@Nullable Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> encodingSupplier, @Nullable Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> decodingSupplier)
public SecretKeySpec key()
protected void preBuild()
public SingleChronicleQueueBuilder strongAppenders(boolean strongAppenders)
public boolean strongAppenders()
public boolean checkInterrupts()
public SingleChronicleQueueBuilder checkInterrupts(boolean checkInterrupts)
public SingleChronicleQueueBuilder clone()
public SingleChronicleQueueBuilder setAllNullFields(@Nullable SingleChronicleQueueBuilder parentBuilder)
this
that are null, from the parentBuilder
- the parentBuilder Chronicle Queue BuilderCopyright © 2018. All rights reserved.