@ParametersAreNonnullByDefault public interface RecyclingSupplier<T> extends Disposable
Modifier and Type | Interface and Description |
---|---|
static interface |
RecyclingSupplier.Factory<T> |
Modifier and Type | Method and Description |
---|---|
T |
get()
block until a object is available and return it.
|
void |
recycle(T object,
Exception e)
return a object previously borrowed from the pool,
together with a optional exception in case one was encountered
while using the object.
|
dispose
@Nonnull T get() throws ObjectCreationException, ObjectBorrowException, InterruptedException, TimeoutException
ObjectCreationException
ObjectBorrowException
InterruptedException
TimeoutException
void recycle(T object, @Nullable Exception e)
object
- e
- Copyright © 2014. All rights reserved.