public interface Pooler
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(Class<T> type)
Either an existing "free" pooled instance is returned
or a new instance will be created.
|
void |
put(Object object)
Put the given object back to pool so it can reused.
|
<T> void |
registerPool(Class<T> type,
Pool<T> pool)
Make the pooler use the given pool for given type.
|
<T> T get(Class<T> type)
Note: type class must have a public no-arg constructor.
T - typetype - type classvoid put(Object object)
object - the instance to return to poolCopyright © 2017. All rights reserved.