public class MethodWriterInvocationHandlerSupplier extends Object implements Supplier<net.openhft.chronicle.bytes.MethodWriterInvocationHandler>
MethodWriterInvocationHandler instances. It
wraps a delegate supplier and applies common options such as history
recording, close behaviour, generic event name, method ID usage and
thread-safety mode. Instances are lazily created and cached per thread unless
thread safety is explicitly disabled.
This supplier is primarily used by
VanillaMethodWriterBuilder when generating method writer proxies.
| Constructor and Description |
|---|
MethodWriterInvocationHandlerSupplier(Supplier<net.openhft.chronicle.bytes.MethodWriterInvocationHandler> supplier)
Creates a supplier that wraps the provided delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableThreadSafe(boolean disableThreadSafe)
Sets the configuration for thread safety.
|
void |
genericEvent(String genericEvent)
Set the event name used by generic method writers.
|
net.openhft.chronicle.bytes.MethodWriterInvocationHandler |
get()
Returns a configured handler.
|
void |
onClose(net.openhft.chronicle.core.io.Closeable closeable)
Assign a resource to be closed when the handler closes.
|
void |
recordHistory(boolean recordHistory)
Enable or disable invocation history recording on new handlers.
|
void |
useMethodIds(boolean useMethodIds)
Determines whether method identifiers are emitted.
|
public MethodWriterInvocationHandlerSupplier(Supplier<net.openhft.chronicle.bytes.MethodWriterInvocationHandler> supplier)
supplier - delegate supplier, commonly returning either a
BinaryMethodWriterInvocationHandler or a
TextMethodWriterInvocationHandlerpublic void recordHistory(boolean recordHistory)
public void onClose(net.openhft.chronicle.core.io.Closeable closeable)
public void disableThreadSafe(boolean disableThreadSafe)
public void genericEvent(String genericEvent)
public void useMethodIds(boolean useMethodIds)
public net.openhft.chronicle.bytes.MethodWriterInvocationHandler get()
disableThreadSafe is true a shared instance is
returned. Each instance is created lazily via newHandler().Copyright © 2026 Chronicle Software Ltd. All rights reserved.