|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridgain.grid.marshaller.jdk.GridJdkMarshaller
public class GridJdkMarshaller
Implementation of GridMarshaller based on JDK serialization mechanism.
GridJdkMarshaller needs to be explicitly configured to override default GridOptimizedMarshaller.
GridJdkMarshaller marshaller = new GridJdkMarshaller(); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override default marshaller. cfg.setMarshaller(marshaller); // Starts grid. G.start(cfg);
<bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfigurationAdapter" singleton="true">
...
<property name="marshaller">
<bean class="org.gridgain.grid.marshaller.jdk.GridJdkMarshaller"/>
</property>
...
</bean>
For information about Spring framework visit www.springframework.org
public class MyGridJob implements GridJob {
...
@GridMarshallerResource
private GridMarshaller marshaller;
...
}
or
public class MyGridJob implements GridJob {
...
private GridMarshaller marshaller;
...
@GridMarshallerResource
public void setMarshaller(GridMarshaller marshaller) {
this.marshaller = marshaller;
}
...
}
| Wiki | |
| Forum |

| Constructor Summary | |
|---|---|
GridJdkMarshaller()
|
|
| Method Summary | ||
|---|---|---|
void |
marshal(Object obj,
OutputStream out)
Marshals object to the output stream. |
|
String |
toString()
|
|
|
unmarshal(InputStream in,
ClassLoader clsLdr)
Unmarshalls object from the output stream using given class loader. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GridJdkMarshaller()
| Method Detail |
|---|
public void marshal(@Nullable
Object obj,
OutputStream out)
throws GridException
marshal in interface GridMarshallerGridException - If marshalling failed.obj - Object to marshal.out - Output stream to marshal into.public <T> T unmarshal(InputStream in, @Nullable ClassLoader clsLdr) throws GridException
unmarshal in interface GridMarshallerGridException - If unmarshalling failed.T - Type of unmarshalled object.in - Input stream.clsLdr - Class loader to use.
public String toString()
toString in class Object
|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Real Time Big Data
|
|
|