| Constructor and Description |
|---|
LoadingPool(Supplier<T> supplier,
Supplier<java.lang.Long> currentTimeMillis,
int initial,
long cacheMissTimeout)
Deprecated.
Creates a new
LoadingPool that will use the supplier to |
| Modifier and Type | Method and Description |
|---|---|
T |
allocate()
Deprecated.
Allocates a new object from the pool.
|
void |
deallocate(T obj)
Deprecated.
Returns an object to the pool.
|
public LoadingPool(Supplier<T> supplier, Supplier<java.lang.Long> currentTimeMillis, int initial, long cacheMissTimeout)
LoadingPool that will use the supplier tosupplier - The Supplier used to create objectsinitial - The number of objects to prepopulate the cache withcacheMissTimeout - The period of time to wait for an object to be available before
using the supplier to create a new one@Nullable public T allocate()
Poolpublic void deallocate(T obj)
Pooldeallocate in interface Pool<T>obj - The object to deallocate