Package alluxio.grpc
Class ReadResponseMarshaller
- java.lang.Object
-
- alluxio.grpc.DataMessageMarshaller<alluxio.grpc.ReadResponse>
-
- alluxio.grpc.ReadResponseMarshaller
-
- All Implemented Interfaces:
BufferRepository<alluxio.grpc.ReadResponse,DataBuffer>
,io.grpc.MethodDescriptor.Marshaller<alluxio.grpc.ReadResponse>
,java.io.Closeable
,java.lang.AutoCloseable
@NotThreadSafe public class ReadResponseMarshaller extends DataMessageMarshaller<alluxio.grpc.ReadResponse>
Marshaller forReadResponse
.
-
-
Constructor Summary
Constructors Constructor Description ReadResponseMarshaller()
Creates aReadResponseMarshaller
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description alluxio.grpc.ReadResponse
combineData(DataMessage<alluxio.grpc.ReadResponse,DataBuffer> message)
Combines the data buffer into the message.protected alluxio.grpc.ReadResponse
deserialize(io.grpc.internal.ReadableBuffer buffer)
Deserialize data buffer to the message.protected io.netty.buffer.ByteBuf[]
serialize(alluxio.grpc.ReadResponse message)
Serialize the message to buffers.-
Methods inherited from class alluxio.grpc.DataMessageMarshaller
close, offerBuffer, parse, pollBuffer, stream
-
-
-
-
Constructor Detail
-
ReadResponseMarshaller
public ReadResponseMarshaller()
Creates aReadResponseMarshaller
.
-
-
Method Detail
-
serialize
protected io.netty.buffer.ByteBuf[] serialize(alluxio.grpc.ReadResponse message) throws java.io.IOException
Description copied from class:DataMessageMarshaller
Serialize the message to buffers.- Specified by:
serialize
in classDataMessageMarshaller<alluxio.grpc.ReadResponse>
- Parameters:
message
- the message to be serialized- Returns:
- an array of
ByteBuf
s containing the serialized message - Throws:
java.io.IOException
- if the marshaller fails to serialize the message
-
deserialize
protected alluxio.grpc.ReadResponse deserialize(io.grpc.internal.ReadableBuffer buffer) throws java.io.IOException
Description copied from class:DataMessageMarshaller
Deserialize data buffer to the message.- Specified by:
deserialize
in classDataMessageMarshaller<alluxio.grpc.ReadResponse>
- Parameters:
buffer
- the buffer that contains the message data- Returns:
- the deserialized message
- Throws:
java.io.IOException
- if the marshaller fails to deserialize the data
-
combineData
public alluxio.grpc.ReadResponse combineData(DataMessage<alluxio.grpc.ReadResponse,DataBuffer> message)
Description copied from class:DataMessageMarshaller
Combines the data buffer into the message.- Specified by:
combineData
in classDataMessageMarshaller<alluxio.grpc.ReadResponse>
- Parameters:
message
- the message to be combined- Returns:
- the message with the combined buffer
-
-