- java.lang.Object
-
- ch.bind.philib.pool.object.ConcurrentPool<T>
-
-
Constructor Summary
Constructors Constructor Description ConcurrentPool(ObjectManager<T> manager, int maxEntries, boolean softRefs, int concurrencyLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()instructs the pool to destroy all pooled objects.intgetConcurrency()intgetNumPooled()PoolStatsgetPoolStats()voidrecycle(T value)Recycles an object which might be reused.Ttake()Take an object from the object-pool.
-
-
-
Constructor Detail
-
ConcurrentPool
public ConcurrentPool(ObjectManager<T> manager, int maxEntries, boolean softRefs, int concurrencyLevel)
-
-
Method Detail
-
recycle
public void recycle(T value)
Description copied from interface:PoolRecycles an object which might be reused. The caller must not use this object after calling this method.
-
getPoolStats
public PoolStats getPoolStats()
- Specified by:
getPoolStatsin interfacePool<T>- Returns:
- This pool's statistics object. Calls to this pool's methods are visible to successive calls to this statics-object's methods.
-
getNumPooled
public int getNumPooled()
- Specified by:
getNumPooledin interfacePool<T>- Returns:
- The number of currently pooled objects.
-
clear
public void clear()
Description copied from interface:Poolinstructs the pool to destroy all pooled objects.
-
getConcurrency
public int getConcurrency()
-
-