Package org.apache.ignite.marshaller
Class AbstractMarshaller
- java.lang.Object
-
- org.apache.ignite.marshaller.AbstractMarshaller
-
- All Implemented Interfaces:
Marshaller
- Direct Known Subclasses:
AbstractNodeNameAwareMarshaller
public abstract class AbstractMarshaller extends Object implements Marshaller
Base class for marshallers. Provides default implementations of methods that work with byte array orGridByteArrayList
. These implementations useGridByteArrayInputStream
orGridByteArrayOutputStream
to marshal and unmarshal objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected MarshallerContext
ctx
Context.static int
DFLT_BUFFER_SIZE
Default initial buffer size for theGridByteArrayOutputStream
.
-
Constructor Summary
Constructors Constructor Description AbstractMarshaller()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description MarshallerContext
getContext()
abstract void
onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed.void
setContext(MarshallerContext ctx)
Sets marshaller context.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.marshaller.Marshaller
marshal, marshal, unmarshal, unmarshal
-
-
-
-
Field Detail
-
DFLT_BUFFER_SIZE
public static final int DFLT_BUFFER_SIZE
Default initial buffer size for theGridByteArrayOutputStream
.- See Also:
- Constant Field Values
-
ctx
protected MarshallerContext ctx
Context.
-
-
Method Detail
-
onUndeploy
public abstract void onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed. Some marshallers may want to clean their internal state that uses the undeployed class loader somehow.- Parameters:
ldr
- Class loader being undeployed.
-
getContext
public MarshallerContext getContext()
- Returns:
- Marshaller context.
-
setContext
public void setContext(MarshallerContext ctx)
Sets marshaller context.- Specified by:
setContext
in interfaceMarshaller
- Parameters:
ctx
- Marshaller context.
-
-