public interface Marshallable extends WriteMarshallable, ReadMarshallable, net.openhft.chronicle.core.io.Resettable
EMPTYDISCARD| Modifier and Type | Method and Description |
|---|---|
static boolean |
$equals(@NotNull WriteMarshallable $this,
Object o) |
default @NotNull Map<String,FieldInfo> |
$fieldInfoMap() |
default @NotNull List<FieldInfo> |
$fieldInfos() |
static int |
$hashCode(WriteMarshallable $this) |
static String |
$toString(WriteMarshallable $this) |
default String |
className() |
default <T extends Marshallable> |
copyTo(T t) |
default <T> T |
deepCopy() |
static <T> T |
fromFile(@NotNull Class<T> expectedType,
String filename)
Reads the file from the current working directory, or the class path.
|
static <T> T |
fromFile(String filename)
Reads the file from the current working directory, or the class path.
|
static <T> T |
fromString(@NotNull CharSequence cs) |
static <T> T |
fromString(@NotNull Class<T> tClass,
@NotNull CharSequence cs) |
static <T> T |
fromString(@NotNull InputStream is) |
default <T> T |
getField(String name,
Class<T> tClass) |
default long |
getLongField(String name) |
default <K,T extends Marshallable> |
mergeToMap(@NotNull Map<K,T> map,
@NotNull Function<T,K> getKey) |
default void |
readMarshallable(@NotNull WireIn wire)
Reads the state of the Marshallable object from the given wire input.
|
default void |
reset() |
default void |
setField(String name,
Object value) |
default void |
setLongField(String name,
long value) |
static <T> @Nullable Stream<T> |
streamFromFile(@NotNull Class<T> expectedType,
String filename) |
static <T> @NotNull Stream<T> |
streamFromFile(String filename) |
default void |
writeMarshallable(@NotNull WireOut wire)
Writes the state of the Marshallable object to the given wire output.
|
binaryLengthLength, writeValueunexpectedFieldstatic boolean $equals(@NotNull
@NotNull WriteMarshallable $this,
Object o)
static int $hashCode(WriteMarshallable $this)
static String $toString(WriteMarshallable $this)
@Nullable
static <T> T fromString(@NotNull
@NotNull CharSequence cs)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@Nullable
static <T> T fromString(@NotNull
@NotNull Class<T> tClass,
@NotNull
@NotNull CharSequence cs)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull static <T> T fromFile(String filename) throws IOException, net.openhft.chronicle.core.io.InvalidMarshallableException
filename - or path to readIOExceptionnet.openhft.chronicle.core.io.InvalidMarshallableExceptionstatic <T> T fromString(@NotNull
@NotNull InputStream is)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@Nullable
static <T> T fromFile(@NotNull
@NotNull Class<T> expectedType,
String filename)
throws IOException,
net.openhft.chronicle.core.io.InvalidMarshallableException
filename - or path to readexpectedType - to deserialize asIOExceptionnet.openhft.chronicle.core.io.InvalidMarshallableException@NotNull static <T> @NotNull Stream<T> streamFromFile(String filename) throws IOException
IOException@Nullable static <T> @Nullable Stream<T> streamFromFile(@NotNull @NotNull Class<T> expectedType, String filename) throws IOException
IOException@Nullable default <T> T getField(String name, Class<T> tClass) throws NoSuchFieldException
NoSuchFieldExceptiondefault void setField(String name, Object value) throws NoSuchFieldException
NoSuchFieldExceptiondefault long getLongField(String name) throws NoSuchFieldException
NoSuchFieldExceptiondefault void setLongField(String name, long value) throws NoSuchFieldException
NoSuchFieldExceptiondefault void readMarshallable(@NotNull
@NotNull WireIn wire)
throws net.openhft.chronicle.core.io.IORuntimeException,
net.openhft.chronicle.core.io.InvalidMarshallableException
The default implementation will use a default value for each field not present
readMarshallable in interface ReadMarshallablewire - The wire input source.net.openhft.chronicle.core.io.IORuntimeException - If an IO error occurs during the read operation.net.openhft.chronicle.core.io.InvalidMarshallableException - If there's an error during marshalling.default void writeMarshallable(@NotNull
@NotNull WireOut wire)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
The default implementation will write all values even if they are a default value. c.f. readMarshallable
writeMarshallable in interface WriteMarshallablewire - The wire output destination.net.openhft.chronicle.core.io.InvalidMarshallableException - If there's an error during marshalling.@NotNull
default <T> T deepCopy()
throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T extends Marshallable> T copyTo(@NotNull T t) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <K,T extends Marshallable> T mergeToMap(@NotNull @NotNull Map<K,T> map, @NotNull @NotNull Function<T,K> getKey)
default String className()
default void reset()
reset in interface net.openhft.chronicle.core.io.ResettableCopyright © 2023. All rights reserved.