public class GridBinaryMarshaller extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
ARR_LIST |
static byte |
BINARY_OBJ |
static byte |
BOOLEAN |
static byte |
BOOLEAN_ARR |
static byte |
BYTE |
static byte |
BYTE_ARR |
static byte |
CHAR |
static byte |
CHAR_ARR |
static byte |
CLASS |
static byte |
COL |
static byte |
DATE |
static byte |
DATE_ARR |
static byte |
DECIMAL |
static byte |
DECIMAL_ARR |
static byte |
DFLT_HDR_LEN |
static byte |
DOUBLE |
static byte |
DOUBLE_ARR |
static byte |
ENUM |
static byte |
ENUM_ARR |
static int |
FLAGS_POS
Flags position in header.
|
static byte |
FLOAT |
static byte |
FLOAT_ARR |
static byte |
HANDLE |
static int |
HASH_CODE_POS |
static byte |
HASH_MAP |
static byte |
HASH_SET |
static byte |
INT |
static byte |
INT_ARR |
static ThreadLocal<Boolean> |
KEEP_BINARIES |
static byte |
LINKED_HASH_MAP |
static byte |
LINKED_HASH_SET |
static byte |
LINKED_LIST |
static byte |
LONG |
static byte |
LONG_ARR |
static byte |
MAP |
static byte |
NULL |
static byte |
OBJ |
static byte |
OBJ_ARR |
static int |
OBJECT |
static byte |
OPTM_MARSH |
static byte |
PLATFORM_JAVA_OBJECT_FACTORY_PROXY |
static byte |
PROTO_VER
Protocol version.
|
static int |
PROTO_VER_POS
Protocol version position.
|
static byte |
PROXY
Proxy.
|
static int |
SCHEMA_ID_POS |
static int |
SCHEMA_OR_RAW_OFF_POS
Schema or raw offset position.
|
static byte |
SHORT |
static byte |
SHORT_ARR |
static byte |
STRING |
static byte |
STRING_ARR |
static byte |
TIME
Time.
|
static byte |
TIME_ARR
Time array.
|
static byte |
TIMESTAMP
Timestamp.
|
static byte |
TIMESTAMP_ARR
Timestamp array.
|
static int |
TOTAL_LEN_POS |
static int |
TYPE_ID_POS |
static int |
UNREGISTERED_TYPE_ID |
static byte |
USER_COL |
static byte |
USER_SET |
static byte |
UUID |
static byte |
UUID_ARR |
Constructor and Description |
---|
GridBinaryMarshaller(BinaryContext ctx) |
Modifier and Type | Method and Description |
---|---|
BinaryContext |
context() |
<T> T |
deserialize(byte[] arr,
ClassLoader ldr) |
byte[] |
marshal(Object obj) |
boolean |
mustDeserialize(Object obj)
Whether object must be deserialized anyway.
|
static void |
popContext(BinaryContext oldCtx)
Pop binary context and restore the old one.
|
BinaryContext |
pushContext()
Push binary context and return the old one.
|
BinaryReaderExImpl |
reader(BinaryInputStream stream)
Creates a reader.
|
static BinaryContext |
threadLocalContext() |
<T> T |
unmarshal(BinaryInputStream in) |
<T> T |
unmarshal(byte[] bytes,
ClassLoader clsLdr) |
BinaryWriterExImpl |
writer(BinaryOutputStream out)
Gets writer for the given output stream.
|
public static final ThreadLocal<Boolean> KEEP_BINARIES
public static final byte OPTM_MARSH
public static final byte BYTE
public static final byte SHORT
public static final byte INT
public static final byte LONG
public static final byte FLOAT
public static final byte DOUBLE
public static final byte CHAR
public static final byte BOOLEAN
public static final byte DECIMAL
public static final byte STRING
public static final byte UUID
public static final byte DATE
public static final byte BYTE_ARR
public static final byte SHORT_ARR
public static final byte INT_ARR
public static final byte LONG_ARR
public static final byte FLOAT_ARR
public static final byte DOUBLE_ARR
public static final byte CHAR_ARR
public static final byte BOOLEAN_ARR
public static final byte DECIMAL_ARR
public static final byte STRING_ARR
public static final byte UUID_ARR
public static final byte DATE_ARR
public static final byte OBJ_ARR
public static final byte COL
public static final byte MAP
public static final byte BINARY_OBJ
public static final byte ENUM
public static final byte ENUM_ARR
public static final byte CLASS
public static final byte TIMESTAMP
public static final byte TIMESTAMP_ARR
public static final byte PROXY
public static final byte TIME
public static final byte TIME_ARR
public static final byte NULL
public static final byte HANDLE
public static final byte OBJ
public static final byte USER_SET
public static final byte USER_COL
public static final byte ARR_LIST
public static final byte LINKED_LIST
public static final byte HASH_SET
public static final byte LINKED_HASH_SET
public static final byte HASH_MAP
public static final byte LINKED_HASH_MAP
public static final byte PLATFORM_JAVA_OBJECT_FACTORY_PROXY
public static final int OBJECT
public static final int UNREGISTERED_TYPE_ID
public static final byte PROTO_VER
public static final int PROTO_VER_POS
public static final int FLAGS_POS
public static final int TYPE_ID_POS
public static final int HASH_CODE_POS
public static final int TOTAL_LEN_POS
public static final int SCHEMA_ID_POS
public static final int SCHEMA_OR_RAW_OFF_POS
public static final byte DFLT_HDR_LEN
public GridBinaryMarshaller(BinaryContext ctx)
ctx
- Context.public byte[] marshal(@Nullable Object obj) throws BinaryObjectException
obj
- Object to marshal.BinaryObjectException
- In case of error.@Nullable public <T> T unmarshal(byte[] bytes, @Nullable ClassLoader clsLdr) throws BinaryObjectException
bytes
- Bytes array.BinaryObjectException
- In case of error.@Nullable public <T> T unmarshal(BinaryInputStream in) throws BinaryObjectException
in
- Input stream.BinaryObjectException
- In case of error.@Nullable public <T> T deserialize(byte[] arr, @Nullable ClassLoader ldr) throws BinaryObjectException
arr
- Byte array.ldr
- Class loader.BinaryObjectException
- In case of error.public BinaryContext pushContext()
public static void popContext(@Nullable BinaryContext oldCtx)
oldCtx
- Old binary context.public BinaryReaderExImpl reader(BinaryInputStream stream)
stream
- Stream.public boolean mustDeserialize(Object obj)
obj
- Object.True
if object will be deserialized on unmarshal.public BinaryWriterExImpl writer(BinaryOutputStream out)
out
- Output stream.public BinaryContext context()
public static BinaryContext threadLocalContext()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017