public enum WireInternal extends Enum<WireInternal>
| Modifier and Type | Method and Description |
|---|---|
static <E extends Enum<E>> |
internEnum(@NotNull Class<E> eClass,
@NotNull CharSequence cs)
Returns the interned instance of the given enum
E that matches the specified character sequence. |
static void |
rawReadData(@NotNull WireIn wireIn,
@NotNull ReadMarshallable dataConsumer)
Reads raw data from the given
wireIn without processing metadata and uses the provided
dataConsumer to process this data. |
static boolean |
readData(long offset,
@NotNull WireIn wireIn,
@Nullable ReadMarshallable metaDataConsumer,
@Nullable ReadMarshallable dataConsumer)
Reads data from the provided
wireIn starting from the given offset, and processes
the data using the provided meta data and data consumers. |
static boolean |
readData(@NotNull WireIn wireIn,
@Nullable ReadMarshallable metaDataConsumer,
@Nullable ReadMarshallable dataConsumer)
Reads data from the given
wireIn and processes the data using the provided
meta data and data consumers. |
static Throwable |
throwable(@NotNull ValueIn valueIn,
boolean appendCurrentStack)
Creates a throwable instance based on the type provided by
valueIn. |
protected static Throwable |
throwable(@NotNull ValueIn valueIn,
boolean appendCurrentStack,
Throwable throwable)
Creates and processes a throwable object based on the data present in the provided
valueIn. |
static WireInternal |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WireInternal[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static long |
writeData(@NotNull WireOut wireOut,
boolean metaData,
boolean notComplete,
@NotNull WriteMarshallable writer)
Writes data to the provided
wireOut based on the given configurations and writer. |
public static WireInternal[] values()
for (WireInternal c : WireInternal.values()) System.out.println(c);
public static WireInternal valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@NotNull public static <E extends Enum<E>> E internEnum(@NotNull @NotNull Class<E> eClass, @NotNull @NotNull CharSequence cs)
E that matches the specified character sequence.
The method ensures that repeated requests for the same enum instance return the same shared object.E - The enum typeeClass - The class of the enum typecs - The character sequence that represents the enum constantpublic static long writeData(@NotNull
@NotNull WireOut wireOut,
boolean metaData,
boolean notComplete,
@NotNull
@NotNull WriteMarshallable writer)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireOut based on the given configurations and writer.wireOut - The output wire to write tometaData - A flag indicating if meta data should be included in the writenotComplete - A flag indicating if the data is not completewriter - The writer responsible for writing the marshallable datanet.openhft.chronicle.core.io.InvalidMarshallableException - If the provided data cannot be marshalled properlypublic static boolean readData(long offset,
@NotNull
@NotNull WireIn wireIn,
@Nullable
@Nullable ReadMarshallable metaDataConsumer,
@Nullable
@Nullable ReadMarshallable dataConsumer)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn starting from the given offset, and processes
the data using the provided meta data and data consumers.offset - The offset to start reading from within the wire inputwireIn - The input wire to read data frommetaDataConsumer - The consumer responsible for processing meta data.
May be null if meta data processing is not required.dataConsumer - The consumer responsible for processing the actual data.
May be null if data processing is not required.net.openhft.chronicle.core.io.InvalidMarshallableException - If the data cannot be unmarshalled properly.public static boolean readData(@NotNull
@NotNull WireIn wireIn,
@Nullable
@Nullable ReadMarshallable metaDataConsumer,
@Nullable
@Nullable ReadMarshallable dataConsumer)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn and processes the data using the provided
meta data and data consumers. This method continues to read as long as there is data
to read and processes the data based on its header to determine whether it's meta data
or actual data.wireIn - The input wire to read data from.metaDataConsumer - The consumer responsible for processing meta data.
May be null if meta data processing is not required.dataConsumer - The consumer responsible for processing the actual data.
May be null if data processing is not required.net.openhft.chronicle.core.io.InvalidMarshallableException - If the data cannot be unmarshalled properly or
there's an issue with the data structure.BufferUnderflowException - If attempting to read more data than what's available.public static void rawReadData(@NotNull
@NotNull WireIn wireIn,
@NotNull
@NotNull ReadMarshallable dataConsumer)
throws net.openhft.chronicle.core.io.InvalidMarshallableException
wireIn without processing metadata and uses the provided
dataConsumer to process this data.wireIn - The input wire from which data is read.dataConsumer - The consumer responsible for processing the actual data.net.openhft.chronicle.core.io.InvalidMarshallableException - If the data cannot be unmarshalled properly or
there's an issue with the data structure.public static Throwable throwable(@NotNull @NotNull ValueIn valueIn, boolean appendCurrentStack) throws net.openhft.chronicle.core.io.InvalidMarshallableException
valueIn. Optionally, this method
can also append the current stack trace to the throwable if appendCurrentStack is true.valueIn - The value input from which the type of the throwable is determined.appendCurrentStack - Flag indicating whether to append the current stack trace to the throwable.valueIn.net.openhft.chronicle.core.io.InvalidMarshallableException - If the throwable cannot be instantiated properly.protected static Throwable throwable(@NotNull @NotNull ValueIn valueIn, boolean appendCurrentStack, Throwable throwable) throws net.openhft.chronicle.core.io.InvalidMarshallableException
valueIn.
The provided throwable is populated with a message and stack trace extracted from the valueIn.
Optionally, the current stack trace can be appended to the throwable's stack trace.valueIn - The value input containing the details of the throwable.appendCurrentStack - Flag indicating whether to append the current stack trace to the throwable.throwable - The throwable to be populated with details from valueIn.net.openhft.chronicle.core.io.InvalidMarshallableException - If the data in valueIn cannot be processed properly.Copyright © 2024. All rights reserved.