|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.io.BufferManagerAdapter
public class BufferManagerAdapter
The BufferManagerAdapter is a WriteBufferPool implementation that is backed by a BufferManager.
This implementation also tracks all ByteBuffer objects allocated by the underlying BufferManager.
| Field Summary | |
|---|---|
protected java.nio.ByteBuffer |
m_bufferThe current (last allocated) buffer. |
| Constructor Summary | |
|---|---|
BufferManagerAdapter(BufferManager mgr)Construct BufferManagerAdapter based on the specified BufferManager. |
|
| Method Summary | |
|---|---|
WriteBuffer |
allocate(int cbPreviousTotal)Allocate a WriteBuffer for use by the MultiBufferWriteBuffer. |
int |
getMaximumCapacity()Determine the largest amount of aggregate WriteBuffer capacity that this factory can provide. |
void |
release(WriteBuffer buffer)This method should not be called. |
BufferSequence |
toBufferSequence()Create a BufferSequence based on the list of ByteBuffers allocated by this adapter. |
| Field Detail |
|---|
protected java.nio.ByteBuffer m_buffer
| Constructor Detail |
|---|
public BufferManagerAdapter(BufferManager mgr)
mgr - the underlying BufferManager| Method Detail |
|---|
public int getMaximumCapacity()
getMaximumCapacity in interface MultiBufferWriteBuffer.WriteBufferPoolpublic WriteBuffer allocate(int cbPreviousTotal)
Note that the returned WriteBuffer is expected to be empty, and its capacity is expected to be identical to its maximum capacity, i.e. it is not expected to resize itself, since the purpose of the MultiBufferWriteBuffer is to act as a dynamically-sized WriteBuffer.
allocate in interface MultiBufferWriteBuffer.WriteBufferPoolcbPreviousTotal - the total number of bytes of capacity of the WriteBuffer objects that the MultiBufferWriteBuffer has thus far consumedpublic void release(WriteBuffer buffer)
release in interface MultiBufferWriteBuffer.WriteBufferPoolbuffer - the WriteBuffer that is no longer being usedpublic BufferSequence toBufferSequence()
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||