Package alluxio.grpc
Interface BufferRepository<TMesg,TBuf>
-
- Type Parameters:
TMesg
- type of the messageTBuf
- 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the repository and all its buffers.void
offerBuffer(TBuf buffer, TMesg message)
Stores a buffer in the repository.TBuf
pollBuffer(TMesg message)
Retrieves and removes a buffer from the store.
-
-
-
Method Detail
-
offerBuffer
void offerBuffer(TBuf buffer, TMesg message)
Stores a buffer in the repository.- Parameters:
buffer
- the buffer to storemessage
- 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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-