@ParametersAreNonnullByDefault public static interface RecyclingSupplier.Factory<T>
| Modifier and Type | Method and Description |
|---|---|
T |
create()
create the object.
|
void |
dispose(T object)
Dispose the object.
|
boolean |
validate(T object,
Exception e)
Validate the object, return true if valid,
false of throw an Exception with validation detail otherwise.
|
T create() throws ObjectCreationException
ObjectCreationException - - cannot create object.void dispose(T object) throws ObjectDisposeException
object - - object to dispose.ObjectDisposeException - - cannot dispose object.@Nullable @CheckReturnValue boolean validate(T object, @Nullable Exception e) throws Exception
object - - object to validate.e - - exception previously encountered while handling the object.Exception - - something happened during validation.Copyright © 2018 SPF4J. All rights reserved.