public interface BinaryWriter
Binarylizable
implementations.
Useful for the cases when user wants a fine-grained control over serialization.
Note that Ignite never writes full strings for field or type names. Instead,
for performance reasons, Ignite writes integer hash codes for type and field names.
It has been tested that hash code conflicts for the type names or the field names
within the same type are virtually non-existent and, to gain performance, it is safe
to work with hash codes. For the cases when hash codes for different types or fields
actually do collide, Ignite provides BinaryIdMapper
which
allows to override the automatically generated hash code IDs for the type and field names.
Modifier and Type | Method and Description |
---|---|
BinaryRawWriter |
rawWriter()
Gets raw writer.
|
void |
writeBoolean(String fieldName,
boolean val) |
void |
writeBooleanArray(String fieldName,
boolean[] val) |
void |
writeByte(String fieldName,
byte val) |
void |
writeByteArray(String fieldName,
byte[] val) |
void |
writeChar(String fieldName,
char val) |
void |
writeCharArray(String fieldName,
char[] val) |
<T> void |
writeCollection(String fieldName,
Collection<T> col) |
void |
writeDate(String fieldName,
Date val) |
void |
writeDateArray(String fieldName,
Date[] val) |
void |
writeDecimal(String fieldName,
BigDecimal val) |
void |
writeDecimalArray(String fieldName,
BigDecimal[] val) |
void |
writeDouble(String fieldName,
double val) |
void |
writeDoubleArray(String fieldName,
double[] val) |
<T extends Enum<?>> |
writeEnum(String fieldName,
T val) |
<T extends Enum<?>> |
writeEnumArray(String fieldName,
T[] val) |
void |
writeFloat(String fieldName,
float val) |
void |
writeFloatArray(String fieldName,
float[] val) |
void |
writeInt(String fieldName,
int val) |
void |
writeIntArray(String fieldName,
int[] val) |
void |
writeLong(String fieldName,
long val) |
void |
writeLongArray(String fieldName,
long[] val) |
<K,V> void |
writeMap(String fieldName,
Map<K,V> map) |
void |
writeObject(String fieldName,
Object obj) |
void |
writeObjectArray(String fieldName,
Object[] val) |
void |
writeShort(String fieldName,
short val) |
void |
writeShortArray(String fieldName,
short[] val) |
void |
writeString(String fieldName,
String val) |
void |
writeStringArray(String fieldName,
String[] val) |
void |
writeTime(String fieldName,
Time val) |
void |
writeTimeArray(String fieldName,
Time[] val) |
void |
writeTimestamp(String fieldName,
Timestamp val) |
void |
writeTimestampArray(String fieldName,
Timestamp[] val) |
void |
writeUuid(String fieldName,
UUID val) |
void |
writeUuidArray(String fieldName,
UUID[] val) |
void writeByte(String fieldName, byte val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeShort(String fieldName, short val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeInt(String fieldName, int val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeLong(String fieldName, long val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeFloat(String fieldName, float val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeDouble(String fieldName, double val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeChar(String fieldName, char val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeBoolean(String fieldName, boolean val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeDecimal(String fieldName, BigDecimal val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeString(String fieldName, String val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeUuid(String fieldName, UUID val) throws BinaryObjectException
fieldName
- Field name.val
- UUID to write.BinaryObjectException
- In case of error.void writeDate(String fieldName, Date val) throws BinaryObjectException
fieldName
- Field name.val
- Date to write.BinaryObjectException
- In case of error.void writeTimestamp(String fieldName, Timestamp val) throws BinaryObjectException
fieldName
- Field name.val
- Timestamp to write.BinaryObjectException
- In case of error.void writeTime(String fieldName, Time val) throws BinaryObjectException
fieldName
- Field name.val
- Time to write.BinaryObjectException
- In case of error.void writeObject(String fieldName, Object obj) throws BinaryObjectException
fieldName
- Field name.obj
- Value to write.BinaryObjectException
- In case of error.void writeByteArray(String fieldName, byte[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeShortArray(String fieldName, short[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeIntArray(String fieldName, int[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeLongArray(String fieldName, long[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeFloatArray(String fieldName, float[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeDoubleArray(String fieldName, double[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeCharArray(String fieldName, char[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeBooleanArray(String fieldName, boolean[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeDecimalArray(String fieldName, BigDecimal[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeStringArray(String fieldName, String[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeUuidArray(String fieldName, UUID[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeDateArray(String fieldName, Date[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeTimestampArray(String fieldName, Timestamp[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeTimeArray(String fieldName, Time[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.void writeObjectArray(String fieldName, Object[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.<T> void writeCollection(String fieldName, Collection<T> col) throws BinaryObjectException
fieldName
- Field name.col
- Collection to write.BinaryObjectException
- In case of error.<K,V> void writeMap(String fieldName, Map<K,V> map) throws BinaryObjectException
fieldName
- Field name.map
- Map to write.BinaryObjectException
- In case of error.<T extends Enum<?>> void writeEnum(String fieldName, T val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.<T extends Enum<?>> void writeEnumArray(String fieldName, T[] val) throws BinaryObjectException
fieldName
- Field name.val
- Value to write.BinaryObjectException
- In case of error.BinaryRawWriter rawWriter()
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024