Package alluxio.grpc

Interface BufferRepository<TMesg,​TBuf>

  • Type Parameters:
    TMesg - type of the message
    TBuf - type of the buffer
    All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    DataMessageMarshaller, ReadResponseMarshaller, WriteRequestMarshaller

    public interface BufferRepository<TMesg,​TBuf>
    extends java.io.Closeable
    A repository of buffers.
    • Method Detail

      • offerBuffer

        void offerBuffer​(TBuf buffer,
                         TMesg message)
        Stores a buffer in the repository.
        Parameters:
        buffer - the buffer to store
        message - the associated message
      • pollBuffer

        TBuf pollBuffer​(TMesg message)
        Retrieves and removes a buffer from the store.
        Parameters:
        message - the message that associated with the buffer
        Returns:
        the buffer, or null if the buffer is not found
      • close

        void close()
        Closes the repository and all its buffers.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable