public abstract class ConcurrentFlushablePool<T> extends org.mini2Dx.gdx.utils.FlushablePool<T> implements ConcurrentCollection
| Modifier and Type | Field and Description |
|---|---|
protected ReadWriteLock |
lock |
| Constructor and Description |
|---|
ConcurrentFlushablePool() |
ConcurrentFlushablePool(int initialCapacity) |
ConcurrentFlushablePool(int initialCapacity,
int max) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all free objects from this pool.
|
void |
flush()
Frees all obtained instances.
|
void |
free(T object) |
void |
freeAll(org.mini2Dx.gdx.utils.Array<T> objects) |
int |
getFree()
The number of objects available to be obtained.
|
ReadWriteLock |
getLock()
Returns the collection's
ReadWriteLock |
T |
obtain() |
protected void |
reset(T object)
Called when an object is freed to clear the state of the object for possible later reuse.
|
protected ReadWriteLock lock
public ConcurrentFlushablePool()
public ConcurrentFlushablePool(int initialCapacity)
public ConcurrentFlushablePool(int initialCapacity,
int max)
public void flush()
flush in class org.mini2Dx.gdx.utils.FlushablePool<T>public void freeAll(org.mini2Dx.gdx.utils.Array<T> objects)
freeAll in class org.mini2Dx.gdx.utils.FlushablePool<T>protected void reset(T object)
Poolable#reset() if the object is Poolable.reset in class org.mini2Dx.gdx.utils.Pool<T>object - public void clear()
clear in class org.mini2Dx.gdx.utils.Pool<T>public int getFree()
getFree in class org.mini2Dx.gdx.utils.Pool<T>public ReadWriteLock getLock()
ConcurrentCollectionReadWriteLockgetLock in interface ConcurrentCollectionReadWriteLock