public abstract class AbstractMarshaller extends Object implements Marshaller
GridByteArrayList. These implementations
use GridByteArrayInputStream or GridByteArrayOutputStream
to marshal and unmarshal objects.| Modifier and Type | Field and Description |
|---|---|
protected MarshallerContext |
ctx
Context.
|
static int |
DFLT_BUFFER_SIZE
Default initial buffer size for the
GridByteArrayOutputStream. |
| Constructor and Description |
|---|
AbstractMarshaller() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
marshal(Object obj)
Marshals object to byte array.
|
abstract void |
onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed.
|
void |
setContext(MarshallerContext ctx)
Sets marshaller context.
|
<T> T |
unmarshal(byte[] arr,
ClassLoader clsLdr)
Unmarshals object from byte array using given class loader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarshal, unmarshalpublic static final int DFLT_BUFFER_SIZE
GridByteArrayOutputStream.protected MarshallerContext ctx
public abstract void onUndeploy(ClassLoader ldr)
ldr - Class loader being undeployed.public void setContext(MarshallerContext ctx)
setContext in interface Marshallerctx - Marshaller context.public byte[] marshal(@Nullable
Object obj)
throws IgniteCheckedException
marshal in interface Marshallerobj - Object to marshal.IgniteCheckedException - If marshalling failed.public <T> T unmarshal(byte[] arr, @Nullable ClassLoader clsLdr) throws IgniteCheckedException
unmarshal in interface MarshallerT - Type of unmarshalled object.arr - Byte array.clsLdr - Class loader to use.IgniteCheckedException - If unmarshalling failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016