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.
 ByteBuffer getLargeBuffer()
          Get a byte buffer of reasonable size, the buffer will have been cleared.
 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.


getLargeBuffer

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


possiblyFlush

void possiblyFlush()
release a buffer if possible.