@FunctionalInterface public interface ReadMarshallable extends net.openhft.chronicle.bytes.CommonMarshallable
For objects which need to deserialize final fields, consider using the Demarshallable interface.
Example usage might involve reading an object's state from a file or network stream without allocating a new object on each read operation.
| Modifier and Type | Field and Description |
|---|---|
static ReadMarshallable |
DISCARD |
| Modifier and Type | Method and Description |
|---|---|
void |
readMarshallable(@NotNull WireIn wire)
Reads the object's state from the given wire input.
|
default void |
unexpectedField(Object event,
ValueIn valueIn)
Handles unexpected fields encountered during the deserialization process.
|
static final ReadMarshallable DISCARD
void readMarshallable(@NotNull
@NotNull WireIn wire)
throws net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
wire - The wire input from which the object's state should be read.net.openhft.chronicle.core.io.IORuntimeException - If there's an error reading from the wire.net.openhft.chronicle.core.io.InvalidMarshallableException - If the data in the wire is not as expected or invalid.default void unexpectedField(Object event, ValueIn valueIn) throws net.openhft.chronicle.core.io.InvalidMarshallableException
event - The event or field identifier that was unexpected.valueIn - The value associated with the unexpected field.net.openhft.chronicle.core.io.InvalidMarshallableException - If the unexpected field cannot be processed.Copyright © 2024. All rights reserved.