Package com.complexible.common.pool
Interface Poolable<E extends java.lang.Exception>
-
public interface Poolable<E extends java.lang.Exception>
Interface for a resource that can be used with an object
Pool
. Objects can implement this marker interface to expose clean ways to clean up a resource prior to being returned to the pool, and initialize it after its checked out of the pool. Using an object in aPool
does not require implementing this interface, but when this is implemented, the pool implementation can better init and clean up pooled resources. Calls toactivate()
and {link #deactivate} are paired in that the object, once deactivated, should require activation before it can be used again.- Since:
- 0.6.5
- Version:
- 0.6.5
- Author:
- Michael Grove
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activate()
Prepare this object for use.void
deactivate()
Clean up the state of an object.
-
-
-
Method Detail
-
activate
void activate() throws E extends java.lang.Exception
Prepare this object for use.
-
-