public interface ExcerptAppender extends ExcerptCommon<ExcerptAppender>, net.openhft.chronicle.wire.MarshallableOut
The component that facilitates sequentially writing data to a ChronicleQueue
.
NOTE: Appenders are NOT thread-safe, sharing the Appender between threads will lead to errors and unpredictable behaviour.
Modifier and Type | Method and Description |
---|---|
int |
cycle() |
default Runnable |
getCloserJob()
A task that will be run if a WeakReference referring this appender is registered with a clean-up task.
|
long |
lastIndexAppended() |
boolean |
lazyIndexing()
Whether to trigger indexing.
|
ExcerptAppender |
lazyIndexing(boolean lazyIndexing)
Set whether to trigger indexing.
|
default <T> T |
methodWriter(Class<T> tClass,
Class... additional) |
default <T> net.openhft.chronicle.wire.VanillaMethodWriterBuilder<T> |
methodWriterBuilder(Class<T> tClass) |
void |
padToCacheAlign(net.openhft.chronicle.wire.MarshallableOut.Padding padToCacheAlign)
Enable padding if near the end of a cache line, pad it so a following 4-byte int value will
not split a cache line.
|
net.openhft.chronicle.wire.MarshallableOut.Padding |
padToCacheAlignMode() |
default void |
pretouch()
Asynchronous call to load a block before it needed to reduce latency.
|
default void |
writeBytes(net.openhft.chronicle.bytes.Bytes bytes) |
void |
writeBytes(net.openhft.chronicle.bytes.BytesStore bytes) |
default net.openhft.chronicle.wire.DocumentContext |
writingDocument(long index)
Write an entry at a given index.
|
queue, sourceId
void writeBytes(@NotNull net.openhft.chronicle.bytes.BytesStore bytes) throws net.openhft.chronicle.wire.UnrecoverableTimeoutException
bytes
- to write to excerpt.net.openhft.chronicle.wire.UnrecoverableTimeoutException
default void writeBytes(@NotNull net.openhft.chronicle.bytes.Bytes bytes) throws net.openhft.chronicle.wire.UnrecoverableTimeoutException
net.openhft.chronicle.wire.UnrecoverableTimeoutException
@NotNull default net.openhft.chronicle.wire.DocumentContext writingDocument(long index)
index
- to write the byte to or fail.StreamCorruptedException
- the write failed is was unable to write the data at the
given index.long lastIndexAppended()
IllegalStateException
- if no index is availableint cycle()
default void pretouch()
void padToCacheAlign(net.openhft.chronicle.wire.MarshallableOut.Padding padToCacheAlign)
@NotNull net.openhft.chronicle.wire.MarshallableOut.Padding padToCacheAlignMode()
padToCacheAlignMode
in interface net.openhft.chronicle.wire.MarshallableOut
@NotNull ExcerptAppender lazyIndexing(boolean lazyIndexing)
lazyIndexing
- if true, don't do any indexing on the append.boolean lazyIndexing()
default Runnable getCloserJob()
@NotNull default <T> T methodWriter(@NotNull Class<T> tClass, Class... additional)
methodWriter
in interface net.openhft.chronicle.wire.MarshallableOut
@NotNull default <T> net.openhft.chronicle.wire.VanillaMethodWriterBuilder<T> methodWriterBuilder(@NotNull Class<T> tClass)
methodWriterBuilder
in interface net.openhft.chronicle.wire.MarshallableOut
Copyright © 2018. All rights reserved.