public class SingleChronicleQueueBuilder extends Object implements ChronicleQueueBuilder
Constructor and Description |
---|
SingleChronicleQueueBuilder(File path) |
SingleChronicleQueueBuilder(String path) |
Modifier and Type | Method and Description |
---|---|
static SingleChronicleQueueBuilder |
binary(File name) |
long |
blockSize() |
SingleChronicleQueueBuilder |
blockSize(int blockSize) |
long |
bufferCapacity() |
SingleChronicleQueueBuilder |
bufferCapacity(int bufferCapacity)
setting the
bufferCapacity also sets buffered to true |
SingleChronicleQueueBuilder |
bufferCapacity(long ringBufferSize) |
boolean |
buffered() |
SingleChronicleQueueBuilder |
buffered(boolean isBuffered)
when set to
true . |
ChronicleQueue |
build() |
SingleChronicleQueueBuilder |
clone() |
long |
epoch() |
SingleChronicleQueueBuilder |
epoch(long epoch)
sets epoch offset in milliseconds
|
net.openhft.chronicle.threads.api.EventLoop |
eventLoop() |
SingleChronicleQueueBuilder |
eventLoop(net.openhft.chronicle.threads.api.EventLoop eventLoop) |
java.util.function.Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> |
onRingBufferStats() |
SingleChronicleQueueBuilder |
onRingBufferStats(java.util.function.Consumer<net.openhft.chronicle.bytes.BytesRingBufferStats> onRingBufferStats)
consumer will be called every second, also as there is data to report
|
SingleChronicleQueueBuilder |
onThrowable(java.util.function.Consumer<Throwable> onThrowable)
use this to trap exceptions that came from the other threads
|
File |
path() |
static SingleChronicleQueueBuilder |
raw(File name) |
RollCycle |
rollCycle() |
SingleChronicleQueueBuilder |
rollCycle(RollCycle rollCycle) |
static SingleChronicleQueueBuilder |
text(File name) |
net.openhft.chronicle.wire.WireType |
wireType() |
SingleChronicleQueueBuilder |
wireType(net.openhft.chronicle.wire.WireType wireType) |
public SingleChronicleQueueBuilder(@NotNull String path)
public SingleChronicleQueueBuilder(@NotNull File path)
@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()
@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 File path()
@NotNull public SingleChronicleQueueBuilder blockSize(int blockSize)
public long blockSize()
@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)
public long bufferCapacity()
@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()
@NotNull public RollCycle rollCycle()
@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()
@Nullable public net.openhft.chronicle.threads.api.EventLoop eventLoop()
@NotNull public SingleChronicleQueueBuilder eventLoop(@NotNull 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.