@FunctionalInterface public interface MarshallableOut
| Modifier and Type | Interface and Description |
|---|---|
static class |
MarshallableOut.Padding |
| Modifier and Type | Method and Description |
|---|---|
default <T> T |
methodWriter(boolean metaData,
Class<T> tClass,
Class... additional)
Proxy an interface so each message called is written to a file for method.
|
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> VanillaMethodWriterBuilder<T> |
methodWriterBuilder(Class<T> tClass) |
default MarshallableOut.Padding |
padToCacheAlignMode()
adds padding to align to cache lines.
|
default boolean |
recordHistory() |
default void |
writeBytes(net.openhft.chronicle.bytes.WriteBytesMarshallable marshallable) |
default <T> void |
writeDocument(T t,
BiConsumer<ValueOut,T> writer)
Write an object with a custom marshalling.
|
default void |
writeDocument(WriteMarshallable writer)
Write the Marshallable as a document/message
|
default void |
writeMap(Map<?,?> map)
Write a Map as a marshallable
|
default void |
writeMessage(WireKey key,
Object value)
Wrie a key and value which could be a scalar or a marshallable.
|
default void |
writeText(CharSequence text) |
default DocumentContext |
writingDocument()
Start a document which is completed when DocumentContext.close() is called.
|
DocumentContext |
writingDocument(boolean metaData) |
@NotNull default DocumentContext writingDocument() throws UnrecoverableTimeoutException
try(DocumentContext dc = appender.writingDocument()) {
dc.wire().write("message").text("Hello World");
}
WARNING : any data written inside the writingDocument(), should be performed as quickly as possible because a write lock is held until the DocumentContext is closed by the try-with-resources, this blocks other appenders and tailers.
try (DocumentContext dc = appender.writingDocument()) {
// this should be performed as quickly as possible because a write lock is held until
the
// DocumentContext is closed by the try-with-resources, this blocks other appenders
and tailers.
}
UnrecoverableTimeoutExceptionDocumentContext writingDocument(boolean metaData) throws UnrecoverableTimeoutException
UnrecoverableTimeoutExceptiondefault boolean recordHistory()
default void writeMessage(WireKey key, Object value) throws UnrecoverableTimeoutException
key - to writevalue - to write with it.UnrecoverableTimeoutExceptiondefault void writeDocument(@NotNull
WriteMarshallable writer)
throws UnrecoverableTimeoutException
writer - to writeUnrecoverableTimeoutExceptiondefault void writeBytes(@NotNull
net.openhft.chronicle.bytes.WriteBytesMarshallable marshallable)
throws UnrecoverableTimeoutException
marshallable - to write to excerpt.UnrecoverableTimeoutExceptiondefault <T> void writeDocument(T t,
@NotNull
BiConsumer<ValueOut,T> writer)
throws UnrecoverableTimeoutException
t - to writewriter - using this codeUnrecoverableTimeoutExceptiondefault void writeText(@NotNull
CharSequence text)
throws UnrecoverableTimeoutException
text - to write a messageUnrecoverableTimeoutExceptiondefault void writeMap(@NotNull
Map<?,?> map)
throws UnrecoverableTimeoutException
UnrecoverableTimeoutException@NotNull
default <T> T methodWriter(@NotNull
Class<T> tClass,
Class... additional)
tClass - primary interfaceadditional - any additional interfaces@NotNull
default <T> T methodWriter(boolean metaData,
@NotNull
Class<T> tClass,
Class... additional)
metaData - true if you wish to write every method as meta datatClass - primary interfaceadditional - any additional interfaces@NotNull default <T> VanillaMethodWriterBuilder<T> methodWriterBuilder(@NotNull Class<T> tClass)
@NotNull default MarshallableOut.Padding padToCacheAlignMode()
Copyright © 2018. All rights reserved.