public class GridClientOptimizedMarshaller extends Object implements GridClientMarshaller
GridOptimizedMarshaller to
GridClientMarshaller interface.| Constructor and Description |
|---|
GridClientOptimizedMarshaller()
Default constructor.
|
GridClientOptimizedMarshaller(boolean requireSer,
List<String> clsNames,
String clsNamesPath,
int poolSize)
Constructs optimized marshaller with specific parameters.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
getProtocolId()
Returns a unique ID of this marshaller's protocol, used
to determine exchange protocol between client
and server.
|
byte[] |
marshal(Object obj)
Marshals object to byte array.
|
<T> T |
unmarshal(byte[] bytes)
Unmarshalls object from byte array.
|
public GridClientOptimizedMarshaller()
public GridClientOptimizedMarshaller(boolean requireSer,
List<String> clsNames,
String clsNamesPath,
int poolSize)
throws IOException
requireSer - Flag to enforce Serializable interface or not. If true,
then objects will be required to implement Serializable in order to be
marshalled, if false, then such requirement will be relaxed.clsNames - User preregistered class names.clsNamesPath - Path to a file with user preregistered class names.poolSize - Object streams pool size.IOException - If an I/O error occurs while writing stream header.GridRuntimeException - If this marshaller is not supported on the current JVM.GridOptimizedMarshallerpublic byte[] marshal(Object obj) throws IOException
marshal in interface GridClientMarshallerobj - Object to marshal.IOException - If marshalling failed.public <T> T unmarshal(byte[] bytes)
throws IOException
unmarshal in interface GridClientMarshallerbytes - Byte array.IOException - If unmarshalling failed.public byte getProtocolId()
getProtocolId in interface GridClientMarshallerCopyright © 2014. All rights reserved.