public class SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue> extends AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S,Q>,Q>
| Modifier and Type | Field and Description |
|---|---|
static boolean |
IS_ENTERPRISE_QUEUE_ON_CLASSPATH |
protected TableStore<SCQMeta> |
metaStore |
blockSize, cycleCalculator, DEFAULT_ROLL_CYCLE_PROPERTY, epoch, eventLoop, path, readBufferMode, readOnly, rollCycle, wireType, writeBufferMode| Modifier | Constructor and Description |
|---|---|
protected |
SingleChronicleQueueBuilder() |
|
SingleChronicleQueueBuilder(File path)
Deprecated.
|
|
SingleChronicleQueueBuilder(String path)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addAliases() |
SingleChronicleQueueBuilder |
aesEncryption(byte[] keyBytes) |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
binary(File basePathFile) |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
binary(Path path) |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
binary(String basePath) |
S |
blockSize(int blockSize)
you should make sure that your largest message size is no larger than 1/4 of your block size
|
S |
blockSize(long blockSize) |
net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> |
bufferBytesStoreCreator() |
S |
bufferBytesStoreCreator(net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> bufferBytesStoreCreator) |
S |
bufferCapacity(long bufferCapacity) |
S |
buffered(boolean isBuffered)
when set to
true. |
Q |
build() |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
builder() |
static SingleChronicleQueueBuilder |
builder(File file,
net.openhft.chronicle.wire.WireType wireType) |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
builder(Path path,
net.openhft.chronicle.wire.WireType wireType) |
SingleChronicleQueueBuilder |
codingSuppliers(Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> encodingSupplier,
Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> decodingSupplier) |
Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> |
decodingSupplier() |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
defaultZeroBinary(File basePathFile) |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
deltaBinary(File basePathFile) |
protected int |
deltaCheckpointInterval() |
S |
enablePreloader(long pretouchIntervalMillis) |
Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> |
encodingSupplier() |
S |
epoch(long epoch)
sets epoch offset in milliseconds
|
S |
eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop) |
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
fieldlessBinary(File name) |
boolean |
hasPretouchIntervalMillis() |
S |
indexCount(int indexCount) |
S |
indexSpacing(int indexSpacing) |
static void |
init() |
protected void |
initializeMetadata() |
int |
maxTailers() |
S |
maxTailers(int maxTailers) |
S |
messageHeader(net.openhft.chronicle.core.util.Updater<net.openhft.chronicle.bytes.Bytes> messageInitializer,
Consumer<net.openhft.chronicle.bytes.Bytes> messageHeaderReader) |
Consumer<net.openhft.chronicle.bytes.Bytes> |
messageHeaderReader() |
net.openhft.chronicle.core.util.Updater<net.openhft.chronicle.bytes.Bytes> |
messageInitializer() |
S |
path(String path) |
S |
pauserSupplier(Supplier<net.openhft.chronicle.threads.TimingPauser> pauser) |
long |
pretouchIntervalMillis() |
QueueOffsetSpec |
queueOffsetSpec() |
S |
readBufferMode(BufferMode readBufferMode) |
S |
readOnly(boolean readOnly) |
S |
recoverySupplier(StoreRecoveryFactory recoverySupplier) |
S |
rollCycle(RollCycle rollCycle) |
S |
rollTime(LocalTime time,
ZoneId zoneId)
Resets the rollTime for the queue cycle to a new time.
|
S |
sourceId(int sourceId) |
WireStoreFactory |
storeFactory() |
S |
storeFileListener(StoreFileListener storeFileListener) |
S |
testBlockSize()
THIS IS FOR TESTING ONLY.
|
static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> |
text(File name)
Deprecated.
|
S |
timeoutMS(long timeoutMS) |
S |
timeProvider(net.openhft.chronicle.core.time.TimeProvider timeProvider) |
S |
wireType(net.openhft.chronicle.wire.WireType wireType) |
S |
writeBufferMode(BufferMode writeBufferMode) |
blockSize, bufferCapacity, buffered, clone, cycleCalculator, decryptSupplier, enableRingBufferMonitoring, enableRingBufferMonitoring, encryptSupplier, epoch, eventLoop, getLogger, hasBlockSize, indexCount, indexSpacing, onRingBufferStats, onRingBufferStats, path, path, pauserSupplier, preBuild, readBufferMode, readOnly, recoverySupplier, rollCycle, sourceId, storeFileListener, strongAppenders, strongAppenders, timeoutMS, timeProvider, wireType, writeBufferModeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAllNullFields, single, single, single, singleText$equals, $fieldInfos, $hashCode, $toString, copyFrom, copyTo, deepCopy, fromFile, fromFile, fromFileAsMap, fromFileAsMap, fromHexString, fromString, fromString, fromString, getClassName, getField, mergeToMap, readMarshallable, reset, setField, streamFromFile, streamFromFile, writeMarshallablepublic static final boolean IS_ENTERPRISE_QUEUE_ON_CLASSPATH
protected TableStore<SCQMeta> metaStore
protected SingleChronicleQueueBuilder()
@Deprecated public SingleChronicleQueueBuilder(@NotNull String path)
@Deprecated public SingleChronicleQueueBuilder(@NotNull File path)
public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> builder()
public WireStoreFactory storeFactory()
public static void addAliases()
public static void init()
@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> 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)
@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> binary(@NotNull Path path)
@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> binary(@NotNull String basePath)
public boolean hasPretouchIntervalMillis()
hasPretouchIntervalMillis in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>hasPretouchIntervalMillis in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> binary(@NotNull File basePathFile)
@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> fieldlessBinary(@NotNull File name)
@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> defaultZeroBinary(@NotNull File basePathFile)
@NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> deltaBinary(@NotNull File basePathFile)
@Deprecated @NotNull public static SingleChronicleQueueBuilder<SingleChronicleQueueBuilder,SingleChronicleQueue> text(@NotNull File name)
@NotNull public Q build()
@Nullable public Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> encodingSupplier()
@Nullable public Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> decodingSupplier()
@NotNull public SingleChronicleQueueBuilder aesEncryption(@Nullable byte[] keyBytes)
@NotNull 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)
@NotNull public S testBlockSize()
ChronicleQueueBuilderUsing this will be slower when you have many messages, and break when you have large messages.
public S sourceId(int sourceId)
sourceId in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>@NotNull public S blockSize(int blockSize)
ChronicleQueueBuilderblockSize in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>blockSize in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>blockSize - the size of the off heap memory mapping@NotNull public S blockSize(long blockSize)
blockSize in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>blockSize in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>@NotNull public S wireType(@NotNull net.openhft.chronicle.wire.WireType wireType)
wireType in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>wireType in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>@NotNull public S rollCycle(@NotNull RollCycle rollCycle)
rollCycle in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>rollCycle in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>@NotNull public S bufferCapacity(long bufferCapacity)
bufferCapacity in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>bufferCapacity in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>bufferCapacity - sets the ring buffer capacity in bytes@NotNull public S epoch(long epoch)
AbstractChronicleQueueBuilderepoch in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>epoch in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>epoch - sets an epoch offset as the number of number of milliseconds since January 1,
1970, 00:00:00 GMTthis@NotNull public S buffered(boolean isBuffered)
AbstractChronicleQueueBuildertrue. uses a ring buffer to buffer appends, excerpts are written to the
Chronicle Queue using a background threadbuffered in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>buffered in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>isBuffered - true if the append is bufferedpublic S writeBufferMode(BufferMode writeBufferMode)
writeBufferMode in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>writeBufferMode in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>writeBufferMode - to use for writes. Only None is available in OSSpublic S readBufferMode(BufferMode readBufferMode)
readBufferMode in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>readBufferMode in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>readBufferMode - to use for read. Only None is available in OSS@NotNull public S eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop)
eventLoop in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>eventLoop in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>eventLoop - to use when asynchronous buffering is used.public S indexCount(int indexCount)
indexCount in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>indexCount in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S indexSpacing(int indexSpacing)
indexSpacing in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>indexSpacing in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S timeProvider(net.openhft.chronicle.core.time.TimeProvider timeProvider)
timeProvider in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S pauserSupplier(Supplier<net.openhft.chronicle.threads.TimingPauser> pauser)
pauserSupplier in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>pauserSupplier in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S timeoutMS(long timeoutMS)
timeoutMS in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S readOnly(boolean readOnly)
readOnly in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>readOnly in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S storeFileListener(StoreFileListener storeFileListener)
storeFileListener in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>storeFileListener in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S recoverySupplier(StoreRecoveryFactory recoverySupplier)
recoverySupplier in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>public S rollTime(@NotNull LocalTime time, ZoneId zoneId)
ChronicleQueueBuilderE.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.
rollTime in interface ChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>rollTime in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>time - the new value for the time of day when the cycle should rollzoneId - the time-zone against which to base the roll-timeprotected void initializeMetadata()
initializeMetadata in class AbstractChronicleQueueBuilder<SingleChronicleQueueBuilder<S extends SingleChronicleQueueBuilder,Q extends SingleChronicleQueue>,Q extends SingleChronicleQueue>protected int deltaCheckpointInterval()
public S enablePreloader(long pretouchIntervalMillis)
public QueueOffsetSpec queueOffsetSpec()
public net.openhft.chronicle.core.util.Updater<net.openhft.chronicle.bytes.Bytes> messageInitializer()
public Consumer<net.openhft.chronicle.bytes.Bytes> messageHeaderReader()
public S messageHeader(net.openhft.chronicle.core.util.Updater<net.openhft.chronicle.bytes.Bytes> messageInitializer, Consumer<net.openhft.chronicle.bytes.Bytes> messageHeaderReader)
public S maxTailers(int maxTailers)
public int maxTailers()
public S bufferBytesStoreCreator(net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> bufferBytesStoreCreator)
public net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> bufferBytesStoreCreator()
public long pretouchIntervalMillis()
Copyright © 2018. All rights reserved.