public interface ValueOut
| Modifier and Type | Interface and Description |
|---|---|
static class |
ValueOut.MapMarshaller<K,V>
This is a kludge and is here so that
WireMarshaller.of(Class) detects this as not a leaf. |
| Modifier and Type | Field and Description |
|---|---|
static ThreadLocal<ValueOut.MapMarshaller> |
MM_TL |
static int |
SMALL_MESSAGE |
static String |
ZEROS_64 |
| Modifier and Type | Method and Description |
|---|---|
default WireOut |
array(boolean[] array,
int length)
Write an array of booleans of a specified length.
|
default WireOut |
array(byte[] array,
int length)
Write an array of bytes of a specified length.
|
default WireOut |
array(net.openhft.chronicle.bytes.Bytes[] array,
int length)
Write an array of bytes sequences of a specified length.
|
default WireOut |
array(double[] array,
int length)
Write an array of doubles of a specified length.
|
default WireOut |
array(int[] array,
int length)
Write an array of ints of a specified length.
|
default WireOut |
array(long[] array,
int length)
Write an array of longs of a specified length.
|
default @NotNull WireOut |
array(@NotNull WriteValue writer,
@NotNull Class arrayType)
Write an array of specified type objects.
|
default WireOut |
arrayDelta(double[] array,
int length)
This write values relative to the first one using 6 digit precision
|
default WireOut |
arrayDelta(long[] array,
int length) |
default <E extends Enum<E>> |
asEnum(E e)
Write an enum value.
|
@NotNull WireOut |
bool(Boolean flag)
Write a boolean value.
|
@NotNull WireOut |
boolForBinding(boolean value,
@NotNull net.openhft.chronicle.core.values.BooleanValue longValue) |
@NotNull WireOut |
bytes(byte[] fromBytes)
Write a byte sequence value.
|
@NotNull WireOut |
bytes(@Nullable net.openhft.chronicle.bytes.BytesStore fromBytes)
Write a byte sequence value from
BytesStore. |
@NotNull WireOut |
bytes(String type,
byte[] fromBytes)
Write a typed byte sequence value.
|
@NotNull WireOut |
bytes(String type,
@Nullable net.openhft.chronicle.bytes.BytesStore fromBytes)
Write a typed bytes sequence value from
BytesStore. |
default @NotNull WireOut |
bytesLiteral(@Nullable net.openhft.chronicle.bytes.BytesStore fromBytes)
Write a byte sequence value from
BytesStore as a literal, if supported by wire type. |
default WireOut |
bytesMarshallable(net.openhft.chronicle.bytes.WriteBytesMarshallable value) |
default @NotNull WireOut |
character(char c)
Write a character value.
|
net.openhft.chronicle.core.pool.ClassLookup |
classLookup() |
default <V> @NotNull WireOut |
collection(Collection<V> coll,
Class<V> assumedClass)
Write a collection containing specified type of entries.
|
default @NotNull WireOut |
compress(@NotNull String compression,
@Nullable net.openhft.chronicle.bytes.Bytes<?> uncompressedBytes) |
default int |
compressedSize() |
@NotNull WireOut |
date(LocalDate localDate)
Write a date value.
|
@NotNull WireOut |
dateTime(LocalDateTime localDateTime)
Write a date time value.
|
default void |
endTypePrefix() |
default @NotNull WireOut |
fixedFloat32(float value)
Write a type-prefixed float value.
|
default @NotNull WireOut |
fixedFloat64(double value)
Write a type-prefixed double value.
|
default @NotNull WireOut |
fixedInt16(short value)
Write a type-prefixed signed 16-bit value.
|
default @NotNull WireOut |
fixedInt32(int value)
Write a type-prefixed signed 32-bit value.
|
default @NotNull WireOut |
fixedInt64(long value)
Write a type-prefixed signed 64-bit value.
|
default @NotNull WireOut |
fixedInt8(byte value)
Write a type-prefixed signed 8-bit value.
|
@NotNull WireOut |
float32(float f)
Write a 32-bit float value.
|
default @NotNull WireOut |
float32(float f,
float previous) |
@NotNull WireOut |
float64(double d)
Write a 64-bit float (double) value.
|
default @NotNull WireOut |
float64(double d,
double previous) |
default @NotNull WireOut |
int128forBinding(long value,
long value2) |
@NotNull WireOut |
int128forBinding(long i64x0,
long i64x1,
net.openhft.chronicle.core.values.TwoLongValue value) |
default @NotNull WireOut |
int16(long x)
Write a signed 16-bit integer value.
|
@NotNull WireOut |
int16(short i16)
Write a signed 16-bit integer value.
|
@NotNull WireOut |
int32(int i32)
Write a signed 32-bit integer value.
|
default @NotNull WireOut |
int32(int i32,
int previous) |
default @NotNull WireOut |
int32(long x)
Write a signed 32-bit integer value.
|
@NotNull WireOut |
int32forBinding(int value) |
@NotNull WireOut |
int32forBinding(int value,
@NotNull net.openhft.chronicle.core.values.IntValue intValue) |
@NotNull WireOut |
int64_0x(long i64)
Write a 64-bit integer as a hex value, if supported by wire type.
|
@NotNull WireOut |
int64(long i64)
Write a signed 64-bit integer value.
|
default @NotNull WireOut |
int64(long i64,
long previous) |
@NotNull WireOut |
int64array(long capacity) |
@NotNull WireOut |
int64array(long capacity,
net.openhft.chronicle.core.values.LongArrayValues values)
Write a 64-bit integer sequence value.
|
@NotNull WireOut |
int64forBinding(long value) |
@NotNull WireOut |
int64forBinding(long value,
@NotNull net.openhft.chronicle.core.values.LongValue longValue) |
@NotNull WireOut |
int8(byte i8)
Write a signed 8-bit integer value.
|
default @NotNull WireOut |
int8(long x)
Write a signed 8-bit integer value.
|
static boolean |
isAnEnum(Object v) |
default boolean |
isBinary() |
default <V> @NotNull WireOut |
list(List<V> coll)
Write a list (collection) value.
|
default <V> @NotNull WireOut |
list(List<V> coll,
Class<V> assumedClass)
Write a list containing specified type of entries.
|
@NotNull WireOut |
map(Map map)
writes the contents of the map to wire
|
default <K,V> @NotNull WireOut |
marshallable(Map<K,V> map)
Write a map.
|
default <K,V> @NotNull WireOut |
marshallable(@Nullable Map<K,V> map,
@NotNull Class<K> kClass,
@NotNull Class<V> vClass,
boolean leaf)
Write a map containing specified key and value typed objects.
|
@NotNull WireOut |
marshallable(Serializable object)
Write a
Serializable value. |
@NotNull WireOut |
marshallable(WriteMarshallable object)
Write a
WriteMarshallable value. |
default @NotNull WireOut |
nu11()
Write a null value.
|
default <V> @NotNull WireOut |
object(@NotNull Class<V> expectedType,
V v)
Write an object value of specified type.
|
default @NotNull WireOut |
object(@Nullable Object value)
Write an object value.
|
default @NotNull ValueOut |
optionalTyped(Class aClass)
Add an optional type i.e.
|
@NotNull WireOut |
rawBytes(byte[] value)
Write a raw bytes sequence value.
|
default @NotNull WireOut |
rawText(CharSequence value)
Write a raw text value.
|
default void |
resetBetweenDocuments() |
void |
resetState() |
default <T> @NotNull WireOut |
sequence(Iterable<T> t)
Write a sequence value from
Iterator. |
<T> @NotNull WireOut |
sequence(T t,
BiConsumer<T,ValueOut> writer)
Write a sequence value using the provided writer.
|
<T,K> @NotNull WireOut |
sequence(T t,
K param,
TriConsumer<T,K,ValueOut> writer)
Write a sequence value using the provided parametrized writer.
|
default @NotNull WireOut |
sequence(WriteValue writer)
Write a sequence value.
|
default <T> WireOut |
sequenceWithLength(T t,
int length,
ObjectIntObjectConsumer<T,ValueOut> writer)
Write a sequence value of a specified length.
|
default <V> @NotNull WireOut |
set(Set<V> coll)
Write a set (collection) value.
|
default <V> @NotNull WireOut |
set(Set<V> coll,
Class<V> assumedClass)
Write a set containing specified type of entries.
|
default boolean |
swapLeaf(boolean isLeaf) |
default @NotNull WireOut |
text(@Nullable net.openhft.chronicle.bytes.BytesStore s)
Write a text value of
BytesStore contents. |
default @NotNull WireOut |
text(char c)
Write a text value comprised of a single character.
|
@NotNull WireOut |
text(@Nullable CharSequence s)
Write a text value.
|
default @NotNull WireOut |
text(@Nullable String s)
Write a text value.
|
default @NotNull WireOut |
throwable(@NotNull Throwable t)
Write a throwable value.
|
@NotNull WireOut |
time(LocalTime localTime)
Write a time value.
|
default @NotNull WireOut |
typedMarshallable(CharSequence typeName,
WriteMarshallable object)
Write a
WriteMarshallable value, prepending it with specified type prefix. |
default @NotNull WireOut |
typedMarshallable(@Nullable Serializable object)
Write a
Serializable value. |
default @NotNull WireOut |
typedMarshallable(@Nullable WriteMarshallable marshallable)
To be used when you know it is a typed marshallable object.
|
default @NotNull WireOut |
typedScalar(@NotNull Object value)
Write an typed scalar value as type prefixed text.
|
@NotNull WireOut |
typeLiteral(@NotNull BiConsumer<Class,net.openhft.chronicle.bytes.Bytes<?>> typeTranslator,
@Nullable Class type)
Write a type literal value using the specified type translator.
|
@NotNull WireOut |
typeLiteral(@Nullable CharSequence type)
Write a type literal value.
|
default @NotNull WireOut |
typeLiteral(@Nullable Class type)
Write a type literal value of a specified
Class. |
default @NotNull WireOut |
typeLiteral(@Nullable Type type)
Write a type literal value of a specified
Type. |
@NotNull ValueOut |
typePrefix(CharSequence typeName)
Write a type prefix for a value.
|
default @NotNull ValueOut |
typePrefix(Class type)
Write a type prefix for a value of a specified
Class. |
default @NotNull WireOut |
uint16(long x)
Write an unsigned 16-bit integer value.
|
@NotNull WireOut |
uint16checked(int u16)
Write an unsigned 16-bit integer value.
|
default @NotNull WireOut |
uint32(long x)
Write an unsigned 32-bit integer value.
|
@NotNull WireOut |
uint32checked(long u32)
Write an unsigned 32-bit integer value.
|
default @NotNull WireOut |
uint8(int x)
Write an unsigned 8-bit integer value.
|
@NotNull WireOut |
uint8checked(int u8)
Write an unsigned 8-bit integer value.
|
default @NotNull WireOut |
untypedObject(@Nullable Object value)
Write an untyped object value.
|
@NotNull WireOut |
utf8(int codepoint)
Write a single Java 16-bit Unicode codepoint.
|
@NotNull WireOut |
uuid(UUID uuid)
Write a UUID value.
|
@NotNull WireOut |
wireOut() |
default WireOut |
writeBoolean(boolean x)
Write a boolean value.
|
default WireOut |
writeByte(byte x)
Write a byte value.
|
default WireOut |
writeChar(char x)
Write a char value.
|
default WireOut |
writeDouble(double x)
Write a double value.
|
default WireOut |
writeFloat(float x)
Write a float value.
|
default WireOut |
writeInt(int x)
Write an int value.
|
default WireOut |
writeInt(IntConverter intConverter,
int i)
Write an int value with a specified converter.
|
@NotNull ValueOut |
writeLength(long remaining)
Writes value length if supported by implementation.
|
default WireOut |
writeLong(long x)
Write a long value.
|
default WireOut |
writeLong(LongConverter longConverter,
long l)
Write a long value with a specified converter.
|
default WireOut |
writeShort(short x)
Write a short value.
|
default WireOut |
writeString(CharSequence x)
Write a string value.
|
@NotNull WireOut |
zonedDateTime(ZonedDateTime zonedDateTime)
Write a date time value with time zone.
|
static final ThreadLocal<ValueOut.MapMarshaller> MM_TL
static final int SMALL_MESSAGE
static final String ZEROS_64
static boolean isAnEnum(Object v)
@NotNull @NotNull WireOut text(@Nullable @Nullable CharSequence s)
@NotNull default @NotNull WireOut text(@Nullable @Nullable String s)
text(CharSequence).@NotNull default @NotNull WireOut nu11()
@NotNull default @NotNull WireOut text(char c)
@NotNull default @NotNull WireOut character(char c)
text(CharSequence).@NotNull default @NotNull WireOut text(@Nullable @Nullable net.openhft.chronicle.bytes.BytesStore s)
BytesStore contents.@NotNull default @NotNull WireOut int8(long x)
int8(byte).ArithmeticException - if supplied argument does not fit in unsigned 8-bit.@NotNull @NotNull WireOut int8(byte i8)
@NotNull @NotNull WireOut bytes(@Nullable @Nullable net.openhft.chronicle.bytes.BytesStore fromBytes)
BytesStore.@NotNull default @NotNull WireOut bytesLiteral(@Nullable @Nullable net.openhft.chronicle.bytes.BytesStore fromBytes)
BytesStore as a literal, if supported by wire type.
Defaults to bytes(BytesStore).@NotNull @NotNull WireOut bytes(String type, @Nullable @Nullable net.openhft.chronicle.bytes.BytesStore fromBytes)
BytesStore.@NotNull @NotNull WireOut rawBytes(byte[] value)
@NotNull default @NotNull WireOut rawText(CharSequence value)
text(CharSequence).@NotNull @NotNull ValueOut writeLength(long remaining)
@NotNull @NotNull WireOut bytes(byte[] fromBytes)
@NotNull @NotNull WireOut bytes(String type, byte[] fromBytes)
@NotNull default @NotNull WireOut uint8(int x)
ArithmeticException - if supplied argument does not fit in unsigned 8-bit.@NotNull @NotNull WireOut uint8checked(int u8)
@NotNull default @NotNull WireOut int16(long x)
ArithmeticException - if supplied argument does not fit in signed 16-bit.@NotNull @NotNull WireOut int16(short i16)
@NotNull default @NotNull WireOut uint16(long x)
uint16checked(int).@NotNull @NotNull WireOut uint16checked(int u16)
@NotNull @NotNull WireOut utf8(int codepoint)
@NotNull default @NotNull WireOut int32(long x)
ArithmeticException - if supplied argument does not fit in signed 32-bit.@NotNull @NotNull WireOut int32(int i32)
@NotNull default @NotNull WireOut int32(int i32, int previous)
@NotNull default @NotNull WireOut uint32(long x)
uint32checked(long).@NotNull @NotNull WireOut uint32checked(long u32)
@NotNull @NotNull WireOut int64(long i64)
@NotNull default @NotNull WireOut int64(long i64, long previous)
@NotNull @NotNull WireOut int128forBinding(long i64x0, long i64x1, net.openhft.chronicle.core.values.TwoLongValue value)
@NotNull @NotNull WireOut int64_0x(long i64)
@NotNull @NotNull WireOut int64array(long capacity)
@NotNull @NotNull WireOut int64array(long capacity, net.openhft.chronicle.core.values.LongArrayValues values)
@NotNull @NotNull WireOut float32(float f)
@NotNull @NotNull WireOut float64(double d)
@NotNull default @NotNull WireOut float32(float f, float previous)
@NotNull default @NotNull WireOut float64(double d, double previous)
@NotNull @NotNull WireOut zonedDateTime(ZonedDateTime zonedDateTime)
@NotNull @NotNull WireOut dateTime(LocalDateTime localDateTime)
@NotNull @NotNull ValueOut typePrefix(CharSequence typeName)
@NotNull default @NotNull ValueOut typePrefix(Class type)
Class.net.openhft.chronicle.core.pool.ClassLookup classLookup()
@NotNull default @NotNull WireOut typeLiteral(@Nullable @Nullable Class type)
Class.@NotNull default @NotNull WireOut typeLiteral(@Nullable @Nullable Type type)
Type.@NotNull @NotNull WireOut typeLiteral(@Nullable @Nullable CharSequence type)
@NotNull @NotNull WireOut typeLiteral(@NotNull @NotNull BiConsumer<Class,net.openhft.chronicle.bytes.Bytes<?>> typeTranslator, @Nullable @Nullable Class type)
@NotNull @NotNull WireOut int32forBinding(int value)
@NotNull @NotNull WireOut int32forBinding(int value, @NotNull @NotNull net.openhft.chronicle.core.values.IntValue intValue)
@NotNull @NotNull WireOut int64forBinding(long value)
@NotNull default @NotNull WireOut int128forBinding(long value, long value2)
@NotNull @NotNull WireOut int64forBinding(long value, @NotNull @NotNull net.openhft.chronicle.core.values.LongValue longValue)
@NotNull @NotNull WireOut boolForBinding(boolean value, @NotNull @NotNull net.openhft.chronicle.core.values.BooleanValue longValue)
@NotNull default @NotNull WireOut sequence(WriteValue writer)
@NotNull default <T> @NotNull WireOut sequence(Iterable<T> t)
Iterator.@NotNull <T> @NotNull WireOut sequence(T t, BiConsumer<T,ValueOut> writer)
@NotNull <T,K> @NotNull WireOut sequence(T t, K param, TriConsumer<T,K,ValueOut> writer) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault <T> WireOut sequenceWithLength(T t, int length, ObjectIntObjectConsumer<T,ValueOut> writer)
default WireOut array(net.openhft.chronicle.bytes.Bytes[] array, int length)
default WireOut array(double[] array, int length)
default WireOut arrayDelta(double[] array, int length)
array - to writelength - to writedefault WireOut array(boolean[] array, int length)
default WireOut array(long[] array, int length)
default WireOut arrayDelta(long[] array, int length)
default WireOut array(int[] array, int length)
default WireOut array(byte[] array, int length)
@NotNull default @NotNull WireOut array(@NotNull @NotNull WriteValue writer, @NotNull @NotNull Class arrayType)
@NotNull @NotNull WireOut marshallable(WriteMarshallable object) throws net.openhft.chronicle.core.io.InvalidMarshallableException
WriteMarshallable value.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull @NotNull WireOut marshallable(Serializable object) throws net.openhft.chronicle.core.io.InvalidMarshallableException
Serializable value.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull @NotNull WireOut map(Map map) throws net.openhft.chronicle.core.io.InvalidMarshallableException
map - a java map with, the key and value type of the map must be either Marshallable,
String or Autoboxed primitives.net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault boolean swapLeaf(boolean isLeaf)
@NotNull default @NotNull WireOut typedMarshallable(@Nullable @Nullable WriteMarshallable marshallable) throws net.openhft.chronicle.core.io.InvalidMarshallableException
object(Object) method.marshallable - to writenet.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault void endTypePrefix()
@NotNull default @NotNull WireOut typedMarshallable(@Nullable @Nullable Serializable object) throws net.openhft.chronicle.core.io.InvalidMarshallableException
Serializable value.
To be used when you know it is a typed serializable object.
If you are not sure, use the object(Object) method.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default @NotNull WireOut typedMarshallable(CharSequence typeName, WriteMarshallable object) throws net.openhft.chronicle.core.io.InvalidMarshallableException
WriteMarshallable value, prepending it with specified type prefix.net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <E extends Enum<E>> @NotNull WireOut asEnum(@Nullable E e)
@NotNull default <V> @NotNull WireOut set(Set<V> coll) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <V> @NotNull WireOut set(Set<V> coll, Class<V> assumedClass) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <V> @NotNull WireOut list(List<V> coll) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <V> @NotNull WireOut list(List<V> coll, Class<V> assumedClass) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <V> @NotNull WireOut collection(Collection<V> coll, Class<V> assumedClass) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <V> @NotNull WireOut object(@NotNull @NotNull Class<V> expectedType, V v) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <K,V> @NotNull WireOut marshallable(Map<K,V> map) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default <K,V> @NotNull WireOut marshallable(@Nullable @Nullable Map<K,V> map, @NotNull @NotNull Class<K> kClass, @NotNull @NotNull Class<V> vClass, boolean leaf) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default @NotNull WireOut object(@Nullable @Nullable Object value) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableExceptiondefault WireOut bytesMarshallable(net.openhft.chronicle.bytes.WriteBytesMarshallable value) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default @NotNull ValueOut optionalTyped(Class aClass)
aClass - to write@NotNull default @NotNull WireOut fixedFloat32(float value)
@NotNull default @NotNull WireOut fixedInt8(byte value)
@NotNull default @NotNull WireOut fixedInt16(short value)
@NotNull default @NotNull WireOut fixedInt32(int value)
@NotNull default @NotNull WireOut fixedFloat64(double value)
@NotNull default @NotNull WireOut fixedInt64(long value)
@NotNull default @NotNull WireOut untypedObject(@Nullable @Nullable Object value) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull default @NotNull WireOut typedScalar(@NotNull @NotNull Object value)
@NotNull default @NotNull WireOut throwable(@NotNull @NotNull Throwable t) throws net.openhft.chronicle.core.io.InvalidMarshallableException
net.openhft.chronicle.core.io.InvalidMarshallableException@NotNull @NotNull WireOut wireOut()
@NotNull default @NotNull WireOut compress(@NotNull @NotNull String compression, @Nullable @Nullable net.openhft.chronicle.bytes.Bytes<?> uncompressedBytes)
default int compressedSize()
default void resetBetweenDocuments()
void resetState()
default boolean isBinary()
true if this wire type is binary wire.default WireOut writeBoolean(boolean x)
bool(Boolean).default WireOut writeByte(byte x)
int8(byte).default WireOut writeChar(char x)
uint16(long).default WireOut writeShort(short x)
int16(long).default WireOut writeInt(int x)
int32(long).default WireOut writeLong(long x)
int64(long).default WireOut writeFloat(float x)
float32(float).default WireOut writeDouble(double x)
float64(double).default WireOut writeString(CharSequence x)
text(CharSequence).default WireOut writeInt(IntConverter intConverter, int i)
default WireOut writeLong(LongConverter longConverter, long l)
Copyright © 2023. All rights reserved.