Class GridClientJdkMarshaller
- java.lang.Object
-
- org.apache.ignite.internal.client.marshaller.jdk.GridClientJdkMarshaller
-
- All Implemented Interfaces:
GridClientMarshaller
public class GridClientJdkMarshaller extends Object implements GridClientMarshaller
Simple marshaller that utilize JDK serialization features.
-
-
Field Summary
Fields Modifier and Type Field Description static byteIDID.
-
Constructor Summary
Constructors Constructor Description GridClientJdkMarshaller()Default constructor.GridClientJdkMarshaller(IgnitePredicate<String> clsFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffermarshal(Object obj, int off)Marshals object to byte array.<T> Tunmarshal(byte[] bytes)Unmarshals object from byte array.
-
-
-
Field Detail
-
ID
public static final byte ID
ID.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridClientJdkMarshaller
public GridClientJdkMarshaller()
Default constructor.
-
GridClientJdkMarshaller
public GridClientJdkMarshaller(IgnitePredicate<String> clsFilter)
- Parameters:
clsFilter- Class filter.
-
-
Method Detail
-
marshal
public ByteBuffer marshal(Object obj, int off) throws IOException
Marshals object to byte array.- Specified by:
marshalin interfaceGridClientMarshaller- Parameters:
obj- Object to marshal.off- Start offset.- Returns:
- Byte buffer.
- Throws:
IOException- If marshalling failed.
-
unmarshal
public <T> T unmarshal(byte[] bytes) throws IOExceptionUnmarshals object from byte array.- Specified by:
unmarshalin interfaceGridClientMarshaller- Parameters:
bytes- Byte array.- Returns:
- Unmarshalled object.
- Throws:
IOException- If unmarshalling failed.
-
-