-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public interface MessageBufferInput implements Closeable
Provides a sequence of MessageBuffer instances.
A MessageBufferInput implementation has control of lifecycle of the memory so that it can reuse previously allocated memory, use memory pools, or use memory-mapped files.
-
-
Method Summary
Modifier and Type Method Description abstract MessageBuffernext()Returns a next buffer to read. abstract voidclose()Closes the input. -
-
Method Detail
-
next
abstract MessageBuffer next()
Returns a next buffer to read.
This method should return a MessageBuffer instance that has data filled in. When this method is called twice,the previously returned buffer is no longer used. Thus implementation of this method can safely discard it.This is useful when it uses a memory pool.
-
-
-
-