CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

com.tangosol.io.nio
Class DirectBufferManager

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.io.nio.AbstractBufferManager
          extended by com.tangosol.io.nio.DirectBufferManager
All Implemented Interfaces:
ByteBufferManager

public class DirectBufferManager
extends AbstractBufferManager

Manages a growable direct ByteBuffer.

Since:
Coherence 2.2
Author:
cp 2002.09.16
See Also:
ByteBuffer

Field Summary
protected static boolean MODE_DEBUG
          Set to true to use on-heap storage, false to use off-heap.
 
Constructor Summary
DirectBufferManager(int cbInitial, int cbMaximum)
          Construct a DirectBufferManager that supports a buffer of a certain initial and maximum size.
 
Method Summary
protected  void allocateBuffer()
          Allocate a new buffer, copying old data if there is any.
 
Methods inherited from class com.tangosol.io.nio.AbstractBufferManager
calibrate, getBuffer, getCapacity, getGrowthThreshold, getMaxCapacity, getMaxIncrement, getMinCapacity, getShrinkageThreshold, grow, setBuffer, setCapacity, setGrowthThreshold, setMaxCapacity, setMinCapacity, setShrinkageThreshold, shrink
 

Field Detail

MODE_DEBUG

protected static final boolean MODE_DEBUG
Set to true to use on-heap storage, false to use off-heap.

See Also:
Constant Field Values
Constructor Detail

DirectBufferManager

public DirectBufferManager(int cbInitial,
                           int cbMaximum)
Construct a DirectBufferManager that supports a buffer of a certain initial and maximum size.

Parameters:
cbInitial - the initial size
cbMaximum - the maximum size
Method Detail

allocateBuffer

protected void allocateBuffer()
Allocate a new buffer, copying old data if there is any.

Specified by:
allocateBuffer in class AbstractBufferManager
See Also:
ByteBuffer.allocateDirect()

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation