Recycler#acquireRecycleOnClose() in a try-with-resources statement, so that when the try block exits, the
acquired instance is recycled.
| Modifier and Type | Field and Description |
|---|---|
| private final T | instance
The instance. |
| private final Recycler | recycler
The recycler. |
| Access | Constructor and Description |
|---|---|
| pack-priv | RecycleOnClose(final Recycler<T, E>
The recycler, final T Recycler.An object instance that was obtained by calling instance)Recycler#acquire() on the recycler.Acquire or allocate an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public T |
| instance | back to summary |
|---|---|
| private final T instance The instance. | |
| recycler | back to summary |
|---|---|
| private final Recycler<T, E> recycler The recycler. | |
| RecycleOnClose | back to summary |
|---|---|
| pack-priv RecycleOnClose(final Recycler<T, E> recycler, final T instance) Acquire or allocate an instance.
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Recycle an instance. Calls
| |
| get | back to summary |
|---|---|
| public T get() Get the object instance.
| |