public interface PortableWriter
PortableMarshalAware 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 PortableIdMapper which
allows to override the automatically generated hash code IDs for the type and field names.
| Modifier and Type | Method and Description |
|---|---|
PortableRawWriter |
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 |
writeTimestamp(String fieldName,
Timestamp val) |
void |
writeUuid(String fieldName,
UUID val) |
void |
writeUuidArray(String fieldName,
UUID[] val) |
void writeByte(String fieldName, byte val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeShort(String fieldName, short val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeInt(String fieldName, int val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeLong(String fieldName, long val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeFloat(String fieldName, float val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeDouble(String fieldName, double val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeChar(String fieldName, char val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeBoolean(String fieldName, boolean val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeDecimal(String fieldName, @Nullable BigDecimal val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeString(String fieldName, @Nullable String val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeUuid(String fieldName, @Nullable UUID val) throws PortableException
fieldName - Field name.val - UUID to write.PortableException - In case of error.void writeDate(String fieldName, @Nullable Date val) throws PortableException
fieldName - Field name.val - Date to write.PortableException - In case of error.void writeTimestamp(String fieldName, @Nullable Timestamp val) throws PortableException
fieldName - Field name.val - Timestamp to write.PortableException - In case of error.void writeObject(String fieldName, @Nullable Object obj) throws PortableException
fieldName - Field name.obj - Value to write.PortableException - In case of error.void writeByteArray(String fieldName, @Nullable byte[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeShortArray(String fieldName, @Nullable short[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeIntArray(String fieldName, @Nullable int[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeLongArray(String fieldName, @Nullable long[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeFloatArray(String fieldName, @Nullable float[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeDoubleArray(String fieldName, @Nullable double[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeCharArray(String fieldName, @Nullable char[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeBooleanArray(String fieldName, @Nullable boolean[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeDecimalArray(String fieldName, @Nullable BigDecimal[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeStringArray(String fieldName, @Nullable String[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeUuidArray(String fieldName, @Nullable UUID[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeDateArray(String fieldName, @Nullable Date[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.void writeObjectArray(String fieldName, @Nullable Object[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.<T> void writeCollection(String fieldName, @Nullable Collection<T> col) throws PortableException
fieldName - Field name.col - Collection to write.PortableException - In case of error.<K,V> void writeMap(String fieldName, @Nullable Map<K,V> map) throws PortableException
fieldName - Field name.map - Map to write.PortableException - In case of error.<T extends Enum<?>> void writeEnum(String fieldName, T val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.<T extends Enum<?>> void writeEnumArray(String fieldName, T[] val) throws PortableException
fieldName - Field name.val - Value to write.PortableException - In case of error.PortableRawWriter rawWriter()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015