Class ByteBufferPoolImpl
java.lang.Object
com.sun.corba.ee.impl.transport.ByteBufferPoolImpl
- All Implemented Interfaces:
ByteBufferPool
- Author:
- Charlie Hunt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet a count of the outstanding allocated DirectByteBuffers.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)
-
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
-