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() |
Modifier and Type | Method and Description |
---|---|
static void |
addAliases() |
SingleChronicleQueueBuilder |
aesEncryption(byte[] keyBytes) |
static SingleChronicleQueueBuilder |
binary(File basePathFile) |
static SingleChronicleQueueBuilder |
binary(Path path) |
static SingleChronicleQueueBuilder |
binary(String basePath) |
long |
blockSize() |
SingleChronicleQueueBuilder |
blockSize(int blockSize) |
SingleChronicleQueueBuilder |
blockSize(long blockSize) |
net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> |
bufferBytesStoreCreator()
Creator for BytesStore for underlying ring buffer.
|
SingleChronicleQueueBuilder |
bufferBytesStoreCreator(net.openhft.chronicle.core.util.ThrowingBiFunction<Long,Integer,net.openhft.chronicle.bytes.BytesStore,Exception> bufferBytesStoreCreator) |
long |
bufferCapacity() |
SingleChronicleQueueBuilder |
bufferCapacity(long bufferCapacity) |
boolean |
buffered()
Deprecated.
|
SingleChronicleQueueBuilder |
buffered(boolean isBuffered)
Deprecated.
|
SingleChronicleQueue |
build() |
static SingleChronicleQueueBuilder |
builder() |
static SingleChronicleQueueBuilder |
builder(File file,
net.openhft.chronicle.wire.WireType wireType) |
static SingleChronicleQueueBuilder |
builder(Path path,
net.openhft.chronicle.wire.WireType wireType) |
boolean |
checkInterrupts() |
SingleChronicleQueueBuilder |
checkInterrupts(boolean checkInterrupts) |
SingleChronicleQueueBuilder |
clone() |
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 |
defaultZeroBinary(File basePathFile) |
static SingleChronicleQueueBuilder |
deltaBinary(File basePathFile) |
static SingleChronicleQueueBuilder |
deltaBinary(File name,
byte deltaIntervalShift) |
int |
deltaCheckpointInterval() |
SingleChronicleQueueBuilder |
enablePreloader(long pretouchIntervalMillis)
Enable out-of-process pretoucher (AKA preloader) (Queue Enterprise feature)
|
boolean |
enableRingBufferMonitoring() |
SingleChronicleQueueBuilder |
enableRingBufferMonitoring(boolean enableRingBufferMonitoring) |
Supplier<BiConsumer<net.openhft.chronicle.bytes.BytesStore,net.openhft.chronicle.bytes.Bytes>> |
encodingSupplier() |
long |
epoch() |
SingleChronicleQueueBuilder |
epoch(long epoch)
sets epoch offset in milliseconds
|
net.openhft.chronicle.core.threads.EventLoop |
eventLoop() |
SingleChronicleQueueBuilder |
eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop) |
static SingleChronicleQueueBuilder |
fieldlessBinary(File name) |
boolean |
hasPretouchIntervalMillis() |
int |
indexCount() |
SingleChronicleQueueBuilder |
indexCount(int indexCount) |
int |
indexSpacing() |
SingleChronicleQueueBuilder |
indexSpacing(int indexSpacing) |
protected void |
initializeMetadata() |
SecretKeySpec |
key() |
int |
maxTailers()
maxTailers
|
SingleChronicleQueueBuilder |
maxTailers(int maxTailers)
RingBuffer tailers need to be preallocated.
|
SingleChronicleQueueBuilder |
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() |
Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> |
onRingBufferStats() |
SingleChronicleQueueBuilder |
onRingBufferStats(Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats)
consumer will be called every second, also as there is data to report
|
File |
path() |
SingleChronicleQueueBuilder |
path(File path) |
SingleChronicleQueueBuilder |
path(Path path) |
SingleChronicleQueueBuilder |
path(String path) |
Supplier<net.openhft.chronicle.threads.TimingPauser> |
pauserSupplier() |
SingleChronicleQueueBuilder |
pauserSupplier(Supplier<net.openhft.chronicle.threads.TimingPauser> pauser) |
protected void |
preBuild() |
long |
pretouchIntervalMillis()
Interval in ms to invoke out of process pretoucher.
|
QueueOffsetSpec |
queueOffsetSpec() |
BufferMode |
readBufferMode() |
SingleChronicleQueueBuilder |
readBufferMode(BufferMode readBufferMode) |
boolean |
readOnly() |
SingleChronicleQueueBuilder |
readOnly(boolean readOnly) |
RollCycle |
rollCycle() |
SingleChronicleQueueBuilder |
rollCycle(RollCycle rollCycle) |
SingleChronicleQueueBuilder |
rollTime(LocalTime rollTime) |
SingleChronicleQueueBuilder |
rollTime(LocalTime rollTime,
ZoneId zoneId) |
ZoneId |
rollTimeZone() |
SingleChronicleQueueBuilder |
rollTimeZone(ZoneId rollTimeZone) |
SingleChronicleQueueBuilder |
setAllNullFields(SingleChronicleQueueBuilder parentBuilder)
updates all the fields in
this that are null, from the |
static SingleChronicleQueueBuilder |
single() |
static SingleChronicleQueueBuilder |
single(File basePath) |
static SingleChronicleQueueBuilder |
single(String basePath) |
int |
sourceId() |
SingleChronicleQueueBuilder |
sourceId(int sourceId) |
WireStoreFactory |
storeFactory() |
StoreFileListener |
storeFileListener() |
SingleChronicleQueueBuilder |
storeFileListener(StoreFileListener storeFileListener) |
boolean |
strongAppenders() |
SingleChronicleQueueBuilder |
strongAppenders(boolean strongAppenders) |
SingleChronicleQueueBuilder |
testBlockSize()
THIS IS FOR TESTING ONLY.
|
long |
timeoutMS() |
SingleChronicleQueueBuilder |
timeoutMS(long timeoutMS) |
net.openhft.chronicle.core.time.TimeProvider |
timeProvider() |
SingleChronicleQueueBuilder |
timeProvider(net.openhft.chronicle.core.time.TimeProvider timeProvider) |
net.openhft.chronicle.wire.WireType |
wireType() |
SingleChronicleQueueBuilder |
wireType(net.openhft.chronicle.wire.WireType wireType) |
BufferMode |
writeBufferMode() |
SingleChronicleQueueBuilder |
writeBufferMode(BufferMode writeBufferMode) |
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()
@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 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 SingleChronicleQueueBuilder enablePreloader(long pretouchIntervalMillis)
pretouchIntervalMillis
- public long pretouchIntervalMillis()
public boolean hasPretouchIntervalMillis()
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 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 © 2019. All rights reserved.