ch.bind.philib.pool.object
public abstract class PoolBase<T> extends Object implements Pool<T>
| Constructor and Description |
|---|
PoolBase(ObjectManager<T> manager) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
instructs the pool to destroy all pooled objects.
|
PoolStats |
getPoolStats() |
protected abstract boolean |
offer(T value) |
protected abstract T |
poll() |
void |
recycle(T value)
Recycles an object which might be reused.
|
T |
take()
Take an object from the object-pool.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumPooledpublic PoolBase(ObjectManager<T> manager)
public final T take()
Poolpublic final void recycle(T value)
Poolpublic final void clear()
Poolpublic final PoolStats getPoolStats()
getPoolStats in interface Pool<T>protected abstract T poll()
protected abstract boolean offer(T value)
Copyright © 2014. All Rights Reserved.