- All Implemented Interfaces:
Pool<T>
public class PoolSync<T>
extends Object
implements Pool<T>
Synchronization wrapper for a pool
-
Constructor Summary
Constructors
-
Method Summary
Get an item from the pool - return null if the pool is empty
final boolean
final void
-
Constructor Details
-
PoolSync
public PoolSync(Pool<T> pool)
-
Method Details
-
create
public static <T> Pool<T> create(Pool<T> pool)
-
put
public final void put(T item)
- Specified by:
put in interface Pool<T>
-
get
Description copied from interface: Pool
Get an item from the pool - return null if the pool is empty
- Specified by:
get in interface Pool<T>
-
isEmpty
public final boolean isEmpty()
- Specified by:
isEmpty in interface Pool<T>