public class JdkMarshaller extends AbstractNodeNameAwareMarshaller
Marshaller based on JDK serialization mechanism.
JdkMarshaller needs to be explicitly configured to override default binary marshaller -
see IgniteBinary.
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()
Default constructor.
|
JdkMarshaller(IgnitePredicate<String> clsFilter) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
marshal0(@Nullable Object obj)
Marshals object to byte array.
|
protected void |
marshal0(@Nullable 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() |
protected <T> T |
unmarshal0(byte[] arr,
@Nullable ClassLoader clsLdr)
Unmarshals object from byte array using given class loader.
|
protected <T> T |
unmarshal0(InputStream in,
@Nullable ClassLoader clsLdr)
Unmarshals object from the input stream using given class loader.
|
marshal, marshal, nodeName, unmarshal, unmarshalgetContext, setContextpublic JdkMarshaller()
public JdkMarshaller(IgnitePredicate<String> clsFilter)
clsFilter - Class name filter.protected void marshal0(@Nullable
@Nullable Object obj,
OutputStream out)
throws IgniteCheckedException
marshal0 in class AbstractNodeNameAwareMarshallerobj - Object to marshal. null object will be marshaled to binary null representation.out - Output stream to marshal into.IgniteCheckedException - If marshalling failed.protected byte[] marshal0(@Nullable
@Nullable Object obj)
throws IgniteCheckedException
marshal0 in class AbstractNodeNameAwareMarshallerobj - Object to marshal. null object will be marshaled to binary null representation.IgniteCheckedException - If marshalling failed.protected <T> T unmarshal0(InputStream in, @Nullable @Nullable ClassLoader clsLdr) throws IgniteCheckedException
unmarshal0 in class AbstractNodeNameAwareMarshallerT - Type of unmarshalled object.in - Input stream.clsLdr - If not null then given class loader will be used for unmarshal object.IgniteCheckedException - If unmarshalling failed.protected <T> T unmarshal0(byte[] arr, @Nullable @Nullable ClassLoader clsLdr) throws IgniteCheckedException
unmarshal0 in class AbstractNodeNameAwareMarshallerT - Type of unmarshalled object.arr - Byte array.clsLdr - If not null then given class loader will be used for unmarshal object.IgniteCheckedException - If unmarshalling failed.public void onUndeploy(ClassLoader ldr)
onUndeploy in class AbstractMarshallerldr - Class loader being undeployed.
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025