|
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.xstream.GridXstreamMarshaller
public class GridXstreamMarshaller
Implementation of GridMarshaller based on XStream.
This marshaller does not require objects to implement Serializable.
GridXstreamMarshaller has to be explicitly configured to override default GridOptimizedMarshaller.
GridXstreamMarshaller marshaller = new GridXstreamMarshaller(); GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Override 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.xstream.GridXstreamMarshaller"/>
</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 | |
|---|---|
GridXstreamMarshaller()
Initializes XStream marshaller. |
|
| 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 GridXstreamMarshaller()
XStream marshaller.
| 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
|
|
|