public class SingleChronicleQueueBuilder extends Object implements ChronicleQueueBuilder, SingleChronicleQueueFields
Modifier | Constructor and Description |
---|---|
|
SingleChronicleQueueBuilder(File path) |
protected |
SingleChronicleQueueBuilder(File path,
ExcerptFactory<SingleChronicleQueue> excerptFactory) |
|
SingleChronicleQueueBuilder(String path) |
protected |
SingleChronicleQueueBuilder(String path,
ExcerptFactory<SingleChronicleQueue> excerptFactory) |
public SingleChronicleQueueBuilder(@NotNull String path)
protected SingleChronicleQueueBuilder(@NotNull String path, @NotNull ExcerptFactory<SingleChronicleQueue> excerptFactory)
public SingleChronicleQueueBuilder(@NotNull File path)
protected SingleChronicleQueueBuilder(@NotNull File path, @NotNull ExcerptFactory<SingleChronicleQueue> excerptFactory)
@NotNull public static SingleChronicleQueueBuilder binary(@NotNull File name)
@NotNull public static SingleChronicleQueueBuilder text(@NotNull File name)
@NotNull public static SingleChronicleQueueBuilder raw(@NotNull File name)
@NotNull public SingleChronicleQueueBuilder onRingBufferStats(@NotNull java.util.function.Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats)
onRingBufferStats
- a consumer of the BytesRingBufferStatspublic java.util.function.Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats()
onRingBufferStats
in interface SingleChronicleQueueFields
@NotNull public File path()
path
in interface SingleChronicleQueueFields
@NotNull public SingleChronicleQueueBuilder blockSize(int blockSize)
public long blockSize()
blockSize
in interface SingleChronicleQueueFields
@NotNull public SingleChronicleQueueBuilder wireType(@NotNull net.openhft.chronicle.wire.WireType wireType)
@NotNull public net.openhft.chronicle.wire.WireType wireType()
wireType
in interface SingleChronicleQueueFields
@NotNull public SingleChronicleQueueBuilder rollCycle(@NotNull RollCycle rollCycle)
public long bufferCapacity()
bufferCapacity
in interface SingleChronicleQueueFields
@NotNull public SingleChronicleQueueBuilder bufferCapacity(long ringBufferSize)
ringBufferSize
- 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()
epoch
in interface SingleChronicleQueueFields
@NotNull public RollCycle rollCycle()
rollCycle
in interface SingleChronicleQueueFields
@NotNull public SingleChronicleQueueBuilder excertpFactory(@NotNull ExcerptFactory<SingleChronicleQueue> excerptFactory)
public ExcerptFactory<SingleChronicleQueue> excertpFactory()
@NotNull public ChronicleQueue build()
build
in interface ChronicleQueueBuilder
@NotNull public SingleChronicleQueueBuilder clone()
@NotNull public SingleChronicleQueueBuilder onThrowable(@NotNull java.util.function.Consumer<Throwable> onThrowable)
onThrowable
- your exception handler@NotNull 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 bufferedpublic boolean buffered()
buffered
in interface SingleChronicleQueueFields
@Nullable public net.openhft.chronicle.threads.api.EventLoop eventLoop()
eventLoop
in interface SingleChronicleQueueFields
@NotNull public SingleChronicleQueueBuilder eventLoop(net.openhft.chronicle.threads.api.EventLoop eventLoop)
@NotNull public SingleChronicleQueueBuilder bufferCapacity(int bufferCapacity)
bufferCapacity
also sets buffered
to true
bufferCapacity
- the capacity of the ring bufferCopyright © 2016. All rights reserved.