Package org.jppf.io
Class BoundedByteArrayPool
java.lang.Object
org.jppf.utils.pooling.AbstractObjectPoolQueue<T>
org.jppf.utils.pooling.AbstractBoundedObjectPoolQueue<byte[]>
org.jppf.io.BoundedByteArrayPool
- All Implemented Interfaces:
ObjectPool<byte[]>
A bounded pool which holds byte arrays with a fixed size.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.utils.pooling.AbstractBoundedObjectPoolQueue
maxSize, sizeFields inherited from class org.jppf.utils.pooling.AbstractObjectPoolQueue
queue -
Constructor Summary
ConstructorsConstructorDescriptionBoundedByteArrayPool(int capacity, int bufferSize) Initiialize this pool with the specified maximum capacity and buffer size. -
Method Summary
Methods inherited from class org.jppf.utils.pooling.AbstractBoundedObjectPoolQueue
get, put, sizeMethods inherited from class org.jppf.utils.pooling.AbstractObjectPoolQueue
createQueue, isEmpty
-
Constructor Details
-
BoundedByteArrayPool
public BoundedByteArrayPool(int capacity, int bufferSize) Initiialize this pool with the specified maximum capacity and buffer size.- Parameters:
capacity- the max capacity of this pool.bufferSize- the size of byte arrays managed by this pool.
-
-
Method Details
-
create
protected byte[] create()Description copied from class:AbstractObjectPoolQueueCreate a new object for the pool.- Specified by:
createin classAbstractObjectPoolQueue<byte[]>- Returns:
- an object that can be returned to the pool.
-