Package ej.sni
Class PoolOfImmortalByteBuffers
- java.lang.Object
-
- ej.sni.PoolOfReusableResources
-
- ej.sni.PoolOfLimitedReusableResources
-
- ej.sni.PoolOfImmortalByteBuffers
-
public class PoolOfImmortalByteBuffers extends PoolOfLimitedReusableResources
A pool of reusable immortal byte buffers.
-
-
Constructor Summary
Constructors Constructor Description PoolOfImmortalByteBuffers(int maxNbResources, int allocationSize)Allocate a new pool of Immortals byte buffer resources
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectnewResource()Allocate a new Immortal byte buffer resource-
Methods inherited from class ej.sni.PoolOfLimitedReusableResources
getAllocationSize
-
Methods inherited from class ej.sni.PoolOfReusableResources
release, reserve
-
-
-
-
Constructor Detail
-
PoolOfImmortalByteBuffers
public PoolOfImmortalByteBuffers(int maxNbResources, int allocationSize)Allocate a new pool of Immortals byte buffer resources- Parameters:
maxNbResources- a strictly positive integer giving the maximum number of allocated resources, or 0 if an unlimited number of resources is allowedallocationSize- size of allocated resources (in bytes). 0 (i.e. unlimited) is not allowed.
-
-
Method Detail
-
newResource
protected Object newResource()
Allocate a new Immortal byte buffer resource- Specified by:
newResourcein classPoolOfReusableResources- Returns:
- the new allocated resource
-
-