rabbit.io
Interface BufferHandle

All Known Implementing Classes:
CacheBufferHandle, SimpleBufferHandle

public interface BufferHandle

A handle to a ByteBuffer

Author:
Robert Olofsson

Method Summary
 ByteBuffer getBuffer()
          Get a byte buffer of reasonable size, the buffer will have been cleared.
 void growBuffer()
          Grow the buffer.
 boolean isEmpty()
          Check if this handle is empty, that is if no buffer exists or the buffer is empty.
 void possiblyFlush()
          release a buffer if possible.
 

Method Detail

isEmpty

boolean isEmpty()
Check if this handle is empty, that is if no buffer exists or the buffer is empty.


getBuffer

ByteBuffer getBuffer()
Get a byte buffer of reasonable size, the buffer will have been cleared.


growBuffer

void growBuffer()
Grow the buffer.


possiblyFlush

void possiblyFlush()
release a buffer if possible.