|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.timeindexing.util.ByteBufferRing
A ring of ByteBuffers. There will be a 'current' buffer in the ring. A buffer can be locked, so it can;t be used again. A buffer can be freed, so it can be used again.
Constructor Summary | |
ByteBufferRing(int count,
int bufSize)
Construct a ByteBufferRing with N ByteBuffers. |
Method Summary | |
java.nio.ByteBuffer |
current()
Get the current buffer. |
int |
free()
How many free buffers are there. |
int |
getBufferSize()
Get the size of the buffers in the ring. |
int |
grow(int growSize)
Grow the ring by N new buffers. |
int |
lock()
Lock the current buffer. |
int |
size()
Get the size of the ring. |
java.lang.String |
toString()
String |
int |
unlock(java.nio.ByteBuffer buffer)
Unlock a buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ByteBufferRing(int count, int bufSize)
Method Detail |
public int size()
public int getBufferSize()
public java.nio.ByteBuffer current()
public int free()
public int lock()
public int unlock(java.nio.ByteBuffer buffer)
public int grow(int growSize)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |