public interface MarshallableOut extends DocumentWritten
| Modifier and Type | Method and Description |
|---|---|
DocumentContext |
acquireWritingDocument(boolean metaData)
Start or reuse an existing a DocumentContext, optionally call close() when done.
|
static MarshallableOutBuilder |
builder(URL url) |
default <T> T |
methodWriter(boolean metaData,
@NotNull Class<T> tClass,
Class... additional)
Deprecated.
use methodWriterBuilder with Stream.of(additional).forEach(builder::addInterface);
|
default <T> T |
methodWriter(@NotNull Class<T> tClass,
Class... additional)
Proxy an interface so each message called is written for replay.
|
default <T> @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
methodWriterBuilder(boolean metaData,
@NotNull Class<T> tClass)
Proxy an interface so each message called is written to a file for method.
|
default <T> @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
methodWriterBuilder(@NotNull Class<T> tClass)
Return a builder for a proxy an interface so each message called is written for method.
|
default boolean |
recordHistory() |
default void |
writeBytes(@NotNull net.openhft.chronicle.bytes.WriteBytesMarshallable marshallable) |
default <T> void |
writeDocument(T t,
@NotNull BiConsumer<ValueOut,T> writer)
Write an object with a custom marshalling.
|
default void |
writeDocument(@NotNull WriteMarshallable writer)
Write the Marshallable as a document/message
|
default void |
writeMap(@NotNull Map<?,?> map)
Write a Map as a marshallable
|
default void |
writeMessage(String eventName,
Object value) |
default void |
writeMessage(WireKey key,
Object value)
Wrie a key and value which could be a scalar or a marshallable.
|
default void |
writeText(@NotNull CharSequence text) |
default @NotNull DocumentContext |
writingDocument()
Start a document which is completed when DocumentContext.close() is called.
|
DocumentContext |
writingDocument(boolean metaData)
Start a new DocumentContext, must always call close() when done.
|
static MarshallableOutBuilder builder(URL url)
@NotNull default @NotNull 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.
}
writingDocument in interface DocumentWrittenUnrecoverableTimeoutExceptionDocumentContext writingDocument(boolean metaData) throws UnrecoverableTimeoutException
writingDocument in interface DocumentWrittenUnrecoverableTimeoutExceptionDocumentContext acquireWritingDocument(boolean metaData) throws UnrecoverableTimeoutException
acquireWritingDocument in interface DocumentWrittenUnrecoverableTimeoutExceptiondefault boolean recordHistory()
default void writeMessage(WireKey key, Object value) throws UnrecoverableTimeoutException
key - to writevalue - to write with it.UnrecoverableTimeoutExceptiondefault void writeMessage(String eventName, Object value) throws UnrecoverableTimeoutException
UnrecoverableTimeoutExceptiondefault void writeDocument(@NotNull
@NotNull WriteMarshallable writer)
throws UnrecoverableTimeoutException,
net.openhft.chronicle.core.io.InvalidMarshallableException
writer - to writeUnrecoverableTimeoutExceptionnet.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault void writeBytes(@NotNull
@NotNull net.openhft.chronicle.bytes.WriteBytesMarshallable marshallable)
throws UnrecoverableTimeoutException,
net.openhft.chronicle.core.io.InvalidMarshallableException
marshallable - to write to excerpt.UnrecoverableTimeoutExceptionnet.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> void writeDocument(T t,
@NotNull
@NotNull BiConsumer<ValueOut,T> writer)
throws UnrecoverableTimeoutException,
net.openhft.chronicle.core.io.InvalidMarshallableException
t - to writewriter - using this codeUnrecoverableTimeoutExceptionnet.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault void writeText(@NotNull
@NotNull CharSequence text)
throws UnrecoverableTimeoutException
text - to write a messageUnrecoverableTimeoutExceptiondefault void writeMap(@NotNull
@NotNull Map<?,?> map)
throws UnrecoverableTimeoutException
UnrecoverableTimeoutException@NotNull
default <T> T methodWriter(@NotNull
@NotNull Class<T> tClass,
Class... additional)
tClass - primary interfaceadditional - any additional interfaces@Deprecated @NotNull default <T> T methodWriter(boolean metaData, @NotNull @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> @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> methodWriterBuilder(@NotNull
@NotNull Class<T> tClass)
tClass - primary interface@NotNull
default <T> @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> methodWriterBuilder(boolean metaData,
@NotNull
@NotNull Class<T> tClass)
metaData - true if you wish to write every method as meta datatClass - primary interfaceCopyright © 2023. All rights reserved.