public class VanillaMethodWriterBuilder<T> extends Object implements net.openhft.chronicle.core.util.Builder<T>, net.openhft.chronicle.bytes.MethodWriterBuilder<T>
| Modifier and Type | Field and Description |
|---|---|
static String |
DISABLE_WRITER_PROXY_CODEGEN |
| Constructor and Description |
|---|
VanillaMethodWriterBuilder(@NotNull Class<T> tClass,
WireType wireType,
@NotNull Supplier<net.openhft.chronicle.bytes.MethodWriterInvocationHandler> handlerSupplier)
Constructs an instance of VanillaMethodWriterBuilder with the specified class type, wire type,
and an invocation handler supplier.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
addInterface(Class<?> additionalClass)
Adds an interface to the set of interfaces managed by this builder.
|
T |
build()
Constructs and returns the method writer object based on the configurations set.
|
@NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
classLoader(ClassLoader classLoader)
Configures the class loader to be used for dynamic class generation and loading.
|
@NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
disableThreadSafe(boolean theadSafe)
Configures the thread-safety for the method writer invocation handler.
|
net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
genericEvent(String genericEvent)
A generic event treats the first argument as the eventName
|
T |
get() |
net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
marshallableOut(@NotNull MarshallableOut out)
Sets the
MarshallableOut instance to be used by the builder. |
net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
marshallableOutSupplier(@NotNull Supplier<MarshallableOut> out)
Sets the supplier for the
MarshallableOut to be used by the builder. |
net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
metaData(boolean metaData)
Specifies whether the builder should include metadata or not.
|
@NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
onClose(net.openhft.chronicle.core.io.Closeable closeable)
Registers a closeable resource with the method writer invocation handler.
|
Class<?> |
proxyClass()
Retrieves the proxy class being used by the builder.
|
net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
proxyClass(Class<?> proxyClass)
Sets the proxy class to be used by the builder.
|
@NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
updateInterceptor(net.openhft.chronicle.bytes.UpdateInterceptor updateInterceptor)
Specifies if verbose types should be used during method writing.
|
@NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> |
verboseTypes(boolean verboseTypes) |
WireType |
wireType()
Fetches the wire type configuration set for the method writer.
|
VanillaMethodWriterBuilder<T> |
wireType(WireType wireType)
Configures the wire type for the method writer.
|
public static final String DISABLE_WRITER_PROXY_CODEGEN
public VanillaMethodWriterBuilder(@NotNull
@NotNull Class<T> tClass,
WireType wireType,
@NotNull
@NotNull Supplier<net.openhft.chronicle.bytes.MethodWriterInvocationHandler> handlerSupplier)
tClass - The class type that the builder will be working on.wireType - The wire type to be used for the method writer.handlerSupplier - Supplier to provide invocation handlers for the method writer.@NotNull public @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> classLoader(ClassLoader classLoader)
classLoader - The class loader to be set.@NotNull public @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> updateInterceptor(net.openhft.chronicle.bytes.UpdateInterceptor updateInterceptor)
updateInterceptor in interface net.openhft.chronicle.bytes.MethodWriterBuilder<T>@NotNull public @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> verboseTypes(boolean verboseTypes)
verboseTypes in interface net.openhft.chronicle.bytes.MethodWriterBuilder<T>@NotNull public @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> addInterface(Class<?> additionalClass)
additionalClass - The interface to be added.IllegalArgumentException - if the provided interface is deemed invalid.@NotNull public @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> disableThreadSafe(boolean theadSafe)
@NotNull public T build()
@NotNull public @NotNull net.openhft.chronicle.bytes.MethodWriterBuilder<T> onClose(net.openhft.chronicle.core.io.Closeable closeable)
onClose in interface net.openhft.chronicle.bytes.MethodWriterBuilder<T>closeable - The closeable resource to be registered.public WireType wireType()
public VanillaMethodWriterBuilder<T> wireType(WireType wireType)
wireType - The wire type to be set.@NotNull public T get()
public net.openhft.chronicle.bytes.MethodWriterBuilder<T> genericEvent(String genericEvent)
genericEvent in interface net.openhft.chronicle.bytes.MethodWriterBuilder<T>genericEvent - namepublic net.openhft.chronicle.bytes.MethodWriterBuilder<T> marshallableOut(@NotNull @NotNull MarshallableOut out)
MarshallableOut instance to be used by the builder.
This will internally set a supplier that always returns the given instance.out - The instance of MarshallableOut to be set.MethodWriterBuilder, allowing chained method calls.public net.openhft.chronicle.bytes.MethodWriterBuilder<T> marshallableOutSupplier(@NotNull @NotNull Supplier<MarshallableOut> out)
MarshallableOut to be used by the builder.out - The supplier of MarshallableOut to be set.MethodWriterBuilder, allowing chained method calls.public net.openhft.chronicle.bytes.MethodWriterBuilder<T> metaData(boolean metaData)
metaData in interface net.openhft.chronicle.bytes.MethodWriterBuilder<T>metaData - A boolean indicating whether to include metadata.MethodWriterBuilder, allowing chained method calls.public Class<?> proxyClass()
public net.openhft.chronicle.bytes.MethodWriterBuilder<T> proxyClass(Class<?> proxyClass)
proxyClass - The class to be set as the proxy class.MethodWriterBuilder, allowing chained method calls.IllegalArgumentException - If the provided class is an interface.Copyright © 2024. All rights reserved.