public class JdkMarshaller extends AbstractMarshaller
Marshaller based on JDK serialization mechanism.
JdkMarshaller needs to be explicitly configured to override default OptimizedMarshaller.
JdkMarshaller marshaller = new JdkMarshaller(); IgniteConfiguration cfg = new IgniteConfiguration(); // Override default marshaller. cfg.setMarshaller(marshaller); // Starts grid. G.start(cfg);
<bean id="grid.custom.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" singleton="true">
...
<property name="marshaller">
<bean class="org.apache.ignite.marshaller.jdk.JdkMarshaller"/>
</property>
...
</bean>
For information about Spring framework visit www.springframework.org
ctx, DFLT_BUFFER_SIZE| Constructor and Description |
|---|
JdkMarshaller() |
| Modifier and Type | Method and Description |
|---|---|
void |
marshal(Object obj,
OutputStream out)
Marshals object to the output stream.
|
void |
onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed.
|
String |
toString() |
<T> T |
unmarshal(InputStream in,
ClassLoader clsLdr)
Unmarshals object from the input stream using given class loader.
|
marshal, setContext, unmarshalpublic void marshal(@Nullable
Object obj,
OutputStream out)
throws IgniteCheckedException
obj - Object to marshal.out - Output stream to marshal into.IgniteCheckedException - If marshalling failed.public <T> T unmarshal(InputStream in, @Nullable ClassLoader clsLdr) throws IgniteCheckedException
T - 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.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016