public abstract class Recycler<T extends AutoCloseable,E extends Exception> extends Object implements AutoCloseable
Constructor and Description |
---|
Recycler() |
Modifier and Type | Method and Description |
---|---|
T |
acquire()
Acquire or allocate an instance.
|
void |
close()
Call this only after all instances have been released.
|
abstract T |
newInstance()
Create a new instance.
|
void |
release(T instance)
Release/recycle an instance.
|
Copyright © 2017. All rights reserved.