Package com.sun.corba.ee.impl.transport
Class ByteBufferPoolImpl
java.lang.Object
com.sun.corba.ee.impl.transport.ByteBufferPoolImpl
- All Implemented Interfaces:
ByteBufferPool
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufferprivate final intprivate final ORBprivate final booleanprivate static final ORBUtilSystemException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet a count of the outstanding allocated DirectByteBuffers.private ByteBufferAllocate a DirectByteBuffer slab.getByteBuffer(int size) Return a ByteBuffer of the requested size.reAllocate(ByteBuffer oldByteBuffer, int minimumSize) Return a newByteBufferof at leastminimumSizeand copy any bytes in theoldByteBufferstarting atoldByteBuffer.position()up tooldByteBuffer.limit()into the returnedByteBuffer.voidreleaseByteBuffer(ByteBuffer buffer)
-
Field Details
-
wrapper
-
byteBufferSlab
-
useDirectBuffers
private final boolean useDirectBuffers -
byteBufferSlabSize
private final int byteBufferSlabSize -
orb
-
-
Constructor Details
-
ByteBufferPoolImpl
-
-
Method Details
-
getByteBuffer
Return a ByteBuffer of the requested size.- Specified by:
getByteBufferin interfaceByteBufferPool
-
releaseByteBuffer
- Specified by:
releaseByteBufferin interfaceByteBufferPool
-
activeCount
public int activeCount()Get a count of the outstanding allocated DirectByteBuffers. (Those allocated and have not been returned to the pool).- Specified by:
activeCountin interfaceByteBufferPool
-
reAllocate
Return a newByteBufferof at leastminimumSizeand copy any bytes in theoldByteBufferstarting atoldByteBuffer.position()up tooldByteBuffer.limit()into the returnedByteBuffer.- Specified by:
reAllocatein interfaceByteBufferPool- Parameters:
oldByteBuffer- old buffer to take bytes fromminimumSize- minimum size of Buffer- Returns:
- the new ByteBuffer
-
allocateDirectByteBufferSlab
Allocate a DirectByteBuffer slab.
-