public class SingleChronicleQueueBuilder extends Object implements ChronicleQueueBuilder
Modifier | Constructor and Description |
---|---|
|
SingleChronicleQueueBuilder(File path) |
protected |
SingleChronicleQueueBuilder(File path,
SingleChronicleQueueExcerptFactory excerptFactory) |
|
SingleChronicleQueueBuilder(String path) |
protected |
SingleChronicleQueueBuilder(String path,
SingleChronicleQueueExcerptFactory excerptFactory) |
public SingleChronicleQueueBuilder(@NotNull String path)
protected SingleChronicleQueueBuilder(@NotNull String path, @NotNull SingleChronicleQueueExcerptFactory excerptFactory)
public SingleChronicleQueueBuilder(@NotNull File path)
protected SingleChronicleQueueBuilder(@NotNull File path, @NotNull SingleChronicleQueueExcerptFactory 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()
@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 SingleChronicleQueueBuilder excertpFactory(@NotNull SingleChronicleQueueExcerptFactory excerptFactory)
@NotNull public SingleChronicleQueueExcerptFactory excertpFactory()
@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.core.threads.EventLoop eventLoop()
@NotNull public SingleChronicleQueueBuilder eventLoop(net.openhft.chronicle.core.threads.EventLoop eventLoop)
@NotNull public SingleChronicleQueueBuilder bufferCapacity(int bufferCapacity)
bufferCapacity
also sets buffered
to true
bufferCapacity
- the capacity of the ring buffer@NotNull public ChronicleQueue build()
build
in interface ChronicleQueueBuilder
@NotNull public SingleChronicleQueueBuilder clone()
Copyright © 2016. All rights reserved.