T - The pooled type.public static class Pools.SynchronizedPool<T> extends Pools.SimplePool<T>
| Constructor and Description |
|---|
SynchronizedPool(int maxPoolSize)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
T |
acquire() |
boolean |
release(T element)
Release an instance to the pool.
|
public SynchronizedPool(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>acquire in class Pools.SimplePool<T>public boolean release(T element)
Pools.Poolrelease in interface Pools.Pool<T>release in class Pools.SimplePool<T>element - The instance to release.Copyright © 2015. All rights reserved.