Package alluxio.grpc

Class WriteRequestMarshaller

  • All Implemented Interfaces:
    BufferRepository<alluxio.grpc.WriteRequest,​DataBuffer>, io.grpc.MethodDescriptor.Marshaller<alluxio.grpc.WriteRequest>, java.io.Closeable, java.lang.AutoCloseable

    @NotThreadSafe
    public class WriteRequestMarshaller
    extends DataMessageMarshaller<alluxio.grpc.WriteRequest>
    Marshaller for WriteRequest.
    • Method Detail

      • serialize

        protected io.netty.buffer.ByteBuf[] serialize​(alluxio.grpc.WriteRequest message)
                                               throws java.io.IOException
        Description copied from class: DataMessageMarshaller
        Serialize the message to buffers.
        Specified by:
        serialize in class DataMessageMarshaller<alluxio.grpc.WriteRequest>
        Parameters:
        message - the message to be serialized
        Returns:
        an array of ByteBufs containing the serialized message
        Throws:
        java.io.IOException - if the marshaller fails to serialize the message
      • deserialize

        protected alluxio.grpc.WriteRequest 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 class DataMessageMarshaller<alluxio.grpc.WriteRequest>
        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.WriteRequest combineData​(@Nullable
                                                     DataMessage<alluxio.grpc.WriteRequest,​DataBuffer> message)
        Description copied from class: DataMessageMarshaller
        Combines the data buffer into the message.
        Specified by:
        combineData in class DataMessageMarshaller<alluxio.grpc.WriteRequest>
        Parameters:
        message - the message to be combined
        Returns:
        the message with the combined buffer