public class JdkMarshaller extends AbstractMarshaller
Marshaller based on JDK serialization mechanism.
GridJdkMarshaller needs to be explicitly configured to override default OptimizedMarshaller.
GridJdkMarshaller marshaller = new GridJdkMarshaller(); GridConfiguration cfg = new GridConfiguration(); // 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.GridJdkMarshaller"/>
</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.
|
String |
toString() |
<T> T |
unmarshal(InputStream in,
ClassLoader clsLdr)
Unmarshals object from the output 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.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015