T
- The pooled type.public static class Pools.SimplePool<T> extends Object implements Pools.Pool<T>
Constructor and Description |
---|
SimplePool(int maxPoolSize)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
T |
acquire() |
boolean |
release(T instance)
Release an instance to the pool.
|
public SimplePool(int maxPoolSize)
maxPoolSize
- The max pool size.IllegalArgumentException
- If the max pool size is less than zero.public T acquire()
acquire
in interface Pools.Pool<T>
public boolean release(T instance)
Pools.Pool
release
in interface Pools.Pool<T>
instance
- The instance to release.