Package org.apache.activeio.packet
Class ByteBufferPacketPool
java.lang.Object
org.apache.activeio.packet.PacketPool
org.apache.activeio.packet.ByteBufferPacketPool
Provides a simple pool of ByteBuffer objects.
- Version:
- $Revision: 1.1 $
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.activeio.packet.PacketPool
PacketPool.PooledPacket
-
Field Summary
Fields inherited from class org.apache.activeio.packet.PacketPool
DEFAULT_PACKET_SIZE, DEFAULT_POOL_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferPacketPool
(int packetCount, int packetSize) Creates a pool ofbufferCount
ByteBuffers that are directly allocated beingbufferSize
big. -
Method Summary
Methods inherited from class org.apache.activeio.packet.PacketPool
dispose, getPacket, waitForPacketsToReturn
-
Constructor Details
-
ByteBufferPacketPool
public ByteBufferPacketPool(int packetCount, int packetSize) Creates a pool ofbufferCount
ByteBuffers that are directly allocated beingbufferSize
big.- Parameters:
packetCount
- the number of buffers that will be in the pool.packetSize
- the size of the buffers that are in the pool.
-
-
Method Details
-
allocateNewPacket
- Specified by:
allocateNewPacket
in classPacketPool
- Returns:
-