|
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.MultiplexingWriteBufferPool
public final class MultiplexingWriteBufferPool
The MultiplexingWriteBufferPool acts as a WriteBufferPool from which a MultiBufferWriteBuffer can allocate and release WriteBuffers from/to.
Field Summary | |
---|---|
static int |
DEFAULT_BUF_SIZE The default size of the smallest WriteBuffer. |
Constructor Summary | |
---|---|
MultiplexingWriteBufferPool() Default constructor. |
|
MultiplexingWriteBufferPool(int cSegments, int cbSegment, int cbBufferMin, int nGrowthFactor) Creates a MultiplexingWriteBufferPool. |
Method Summary | |
---|---|
WriteBuffer |
allocate(int cbPreviousTotal) Allocate a WriteBuffer for use by the MultiBufferWriteBuffer. |
void |
dispose() |
protected static int |
encodeGeneration(int cb, int nGenId) Return the buffer allocation size for a given generation. |
static int |
getBaseBufferSize(int cbBufferMin) Return the base buffer size for the specified minimum buffer size. |
int |
getMaximumCapacity() Determine the largest amount of aggregate WriteBuffer capacity that this factory can provide. |
static int |
getMaximumSegmentBufferSize(int iSeg, int cbMin, int nGrowthFactor) Return the maximum buffer size for a buffer in the specified segment. |
void |
release(WriteBuffer buffer) Returns a WriteBuffer to the pool. |
Field Detail |
---|
public static final int DEFAULT_BUF_SIZE
Constructor Detail |
---|
public MultiplexingWriteBufferPool()
public MultiplexingWriteBufferPool(int cSegments, int cbSegment, int cbBufferMin, int nGrowthFactor)
cSegments
- the number of segmentscbSegment
- the maximum number bytes each segment will consumecbBufferMin
- the smallest buffer sizenGrowthFactor
- the segment growth factorMethod Detail |
---|
public int getMaximumCapacity()
getMaximumCapacity
in interface MultiBufferWriteBuffer.WriteBufferPool
public 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.WriteBufferPool
cbPreviousTotal
- the total number of bytes of capacity of the WriteBuffer objects that the MultiBufferWriteBuffer has thus far consumedpublic void release(WriteBuffer buffer)
AbstractWriteBuffer.clear()
, or AbstractWriteBuffer.retain(int)
, or MultiBufferWriteBuffer.retain(int, int)
is called.release
in interface MultiBufferWriteBuffer.WriteBufferPool
buffer
- the WriteBuffer that is no longer being usedpublic void dispose()
public static int getMaximumSegmentBufferSize(int iSeg, int cbMin, int nGrowthFactor)
iSeg
- the segmentcbMin
- the pool's minimum buffer sizenGrowthFactor
- the segment grown factorpublic static int getBaseBufferSize(int cbBufferMin)
cbBufferMin
- the minimum buffer sizeprotected static int encodeGeneration(int cb, int nGenId)
cb
- the segments base buffer sizenGenId
- the generation
|
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 |