public interface ExcerptAppender extends ExcerptCommon
ChronicleQueue
.Modifier and Type | Method and Description |
---|---|
int |
cycle() |
long |
lastIndexAppended() |
default <T> T |
methodWriter(Class<T> tClass,
Class... additional)
Proxy an interface so each message called is written to a file for replay.
|
default <T> MethodWriterBuilder<T> |
methodWriterBuilder(Class<T> tClass) |
void |
writeBytes(net.openhft.chronicle.bytes.Bytes<?> bytes) |
default void |
writeBytes(long index,
net.openhft.chronicle.bytes.Bytes<?> bytes)
Write an entry at a given index.
|
void |
writeBytes(net.openhft.chronicle.bytes.WriteBytesMarshallable marshallable) |
void |
writeDocument(net.openhft.chronicle.wire.WriteMarshallable writer) |
default void |
writeMap(Map<String,?> map)
Write a Map as a marshallable
|
default void |
writeText(CharSequence text) |
net.openhft.chronicle.wire.DocumentContext |
writingDocument()
Start a document which is completed when DocumentContext.close() is called.
|
net.openhft.chronicle.wire.DocumentContext writingDocument()
try(DocumentContext context = appender.writingDocument()) { context.wire().write("message").text("Hello World"); }
void writeDocument(@NotNull net.openhft.chronicle.wire.WriteMarshallable writer)
writer
- to write to excerpt.void writeBytes(@NotNull net.openhft.chronicle.bytes.WriteBytesMarshallable marshallable)
marshallable
- to write to excerpt.void writeBytes(@NotNull net.openhft.chronicle.bytes.Bytes<?> bytes)
bytes
- to write to excerpt.default void writeText(CharSequence text)
text
- to write a messagedefault void writeBytes(long index, net.openhft.chronicle.bytes.Bytes<?> bytes) throws StreamCorruptedException
index
- to write the byte to or fail.bytes
- to write.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 <T> T methodWriter(Class<T> tClass, Class... additional)
tClass
- primary interfaceadditional
- any additional interfacesdefault <T> MethodWriterBuilder<T> methodWriterBuilder(Class<T> tClass)
Copyright © 2016. All rights reserved.