Package icyllis.modernui.util
Interface Pools.Pool<T>
- Type Parameters:
T
- The pooled type.
- All Known Implementing Classes:
MpmcArrayQueue
,Pools.SimplePool
,Pools.SynchronizedPool
- Enclosing class:
Pools
public static interface Pools.Pool<T>
Interface for managing a pool of objects.
-
Method Summary
-
Method Details
-
acquire
- Returns:
- An instance from the pool if such, null otherwise.
-
release
Release an instance to the pool.- Parameters:
instance
- The instance to release.- Returns:
- Whether the instance was put in the pool.
- Throws:
IllegalStateException
- If the instance is already in the pool.
-