public final class GryoMessageSerializerV1d0 extends Object implements MessageSerializer
logger| Constructor and Description |
|---|
GryoMessageSerializerV1d0()
Creates an instance with a standard
GryoMapper instance. |
GryoMessageSerializerV1d0(GryoMapper kryo)
Creates an instance with a provided mapper configured
GryoMapper instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Map<String,Object> config,
Map<String,Graph> graphs)
Configure the serializer with mapper settings as required.
|
RequestMessage |
deserializeRequest(ByteBuf msg)
Deserialize a Netty
ByteBuf into a RequestMessage. |
ResponseMessage |
deserializeResponse(ByteBuf msg)
Deserialize a Netty
ByteBuf into a ResponseMessage. |
String[] |
mimeTypesSupported()
The list of mime types that the serializer supports.
|
ByteBuf |
serializeRequestAsBinary(RequestMessage requestMessage,
ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf. |
ByteBuf |
serializeResponseAsBinary(ResponseMessage responseMessage,
ByteBufAllocator allocator)
Serialize a
ResponseMessage to a Netty ByteBuf. |
public GryoMessageSerializerV1d0()
GryoMapper instance. Note that this instance
will be overriden by configure(java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, org.apache.tinkerpop.gremlin.structure.Graph>) is called.public GryoMessageSerializerV1d0(GryoMapper kryo)
GryoMapper instance. Note that this instance
will be overriden by configure(java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, org.apache.tinkerpop.gremlin.structure.Graph>) is called.public void configure(Map<String,Object> config, Map<String,Graph> graphs)
MessageSerializerconfigure in interface MessageSerializerpublic String[] mimeTypesSupported()
MessageSerializermimeTypesSupported in interface MessageSerializerpublic ResponseMessage deserializeResponse(ByteBuf msg) throws SerializationException
MessageSerializerByteBuf into a ResponseMessage.deserializeResponse in interface MessageSerializerSerializationExceptionpublic ByteBuf serializeResponseAsBinary(ResponseMessage responseMessage, ByteBufAllocator allocator) throws SerializationException
MessageSerializerResponseMessage to a Netty ByteBuf.serializeResponseAsBinary in interface MessageSerializerresponseMessage - The response message to serialize to bytes.allocator - The Netty allocator for the ByteBuf to return back.SerializationExceptionpublic RequestMessage deserializeRequest(ByteBuf msg) throws SerializationException
MessageSerializerByteBuf into a RequestMessage.deserializeRequest in interface MessageSerializerSerializationExceptionpublic ByteBuf serializeRequestAsBinary(RequestMessage requestMessage, ByteBufAllocator allocator) throws SerializationException
MessageSerializerResponseMessage to a Netty ByteBuf.serializeRequestAsBinary in interface MessageSerializerrequestMessage - The request message to serialize to bytes.allocator - The Netty allocator for the ByteBuf to return back.SerializationExceptionCopyright © 2013–2015 Apache Software Foundation. All rights reserved.