Package org.gridgain.internal.dr.nio
Class DrNioMessageMarshaller
java.lang.Object
org.gridgain.internal.dr.nio.DrNioMessageMarshaller
- All Implemented Interfaces:
DrMessageMarshaller<ByteBuffer>
DR messages marshaller.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMarshal message.static ByteBufferMarshal metadata request.unmarshal(ByteBuffer in) Unmarshal message.static intReturns the length in bytes of the UTF encoding of the given string.static voidwriteUtf(DataOutput out, String s) Writes the "body" (i.e., the UTF representation minus the 2-byte or 8-byte length header) of the UTF encoding for the given string.
-
Constructor Details
-
DrNioMessageMarshaller
public DrNioMessageMarshaller()
-
-
Method Details
-
unmarshal
Unmarshal message.- Specified by:
unmarshalin interfaceDrMessageMarshaller<ByteBuffer>- Parameters:
in- Message bytes.- Returns:
- Message.
-
marshal
Marshal message.- Specified by:
marshalin interfaceDrMessageMarshaller<ByteBuffer>- Parameters:
msg- Message.- Returns:
- Message bytes.
-
marshal
Marshal metadata request. -
utfLength
Returns the length in bytes of the UTF encoding of the given string.- Parameters:
str- String.- Returns:
- UTF encoding length.
-
writeUtf
Writes the "body" (i.e., the UTF representation minus the 2-byte or 8-byte length header) of the UTF encoding for the given string.- Parameters:
s- String.- Throws:
IOException
-