public class BinaryMarshaller extends AbstractNodeNameAwareMarshaller
Marshaller that lets to serialize and deserialize all objects
in the binary format.ctx, DFLT_BUFFER_SIZE| Constructor and Description |
|---|
BinaryMarshaller() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
available()
Checks whether
BinaryMarshaller is able to work on the current JVM. |
GridBinaryMarshaller |
binaryMarshaller() |
protected byte[] |
marshal0(Object obj)
Marshals object to byte array.
|
protected void |
marshal0(Object obj,
OutputStream out)
Marshals object to the output stream.
|
void |
onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed.
|
protected <T> T |
unmarshal0(byte[] bytes,
ClassLoader clsLdr)
Unmarshals object from byte array using given class loader.
|
protected <T> T |
unmarshal0(InputStream in,
ClassLoader clsLdr)
Unmarshals object from the input stream using given class loader.
|
marshal, marshal, nodeName, unmarshal, unmarshalgetContext, setContextpublic static boolean available()
BinaryMarshaller is able to work on the current JVM.
As long as BinaryMarshaller uses JVM-private API, which is not guaranteed
to be available on all JVM, this method should be called to ensure marshaller could work properly.
Result of this method is automatically checked in constructor.
true if BinaryMarshaller can work on the current JVM or
false if it can't.protected byte[] marshal0(@Nullable
Object obj)
throws IgniteCheckedException
marshal0 in class AbstractNodeNameAwareMarshallerobj - Object to marshal.IgniteCheckedException - If marshalling failed.protected void marshal0(@Nullable
Object obj,
OutputStream out)
throws IgniteCheckedException
marshal0 in class AbstractNodeNameAwareMarshallerobj - Object to marshal.out - Output stream to marshal into.IgniteCheckedException - If marshalling failed.protected <T> T unmarshal0(byte[] bytes,
@Nullable
ClassLoader clsLdr)
throws IgniteCheckedException
unmarshal0 in class AbstractNodeNameAwareMarshallerT - Type of unmarshalled object.bytes - Byte array.clsLdr - Class loader to use.IgniteCheckedException - If unmarshalling failed.protected <T> T unmarshal0(InputStream in, @Nullable ClassLoader clsLdr) throws IgniteCheckedException
unmarshal0 in class AbstractNodeNameAwareMarshallerT - Type of unmarshalled object.in - Input stream.clsLdr - Class loader to use.IgniteCheckedException - If unmarshalling failed.public void onUndeploy(ClassLoader ldr)
onUndeploy in class AbstractMarshallerldr - Class loader being undeployed.public GridBinaryMarshaller binaryMarshaller()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.0 Release Date : May 23 2018