Interface ObjectPoolHandler<T>
-
public interface ObjectPoolHandler<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddisposeObject(T object)Disposes the object.TmakeObject()Makes a new instance of the pooled object.voidshutdown()Releases any allocated resources.voidtestObject(T object)Tests the borrowed object.org.identityconnectors.common.pooling.ObjectPoolConfigurationvalidate(org.identityconnectors.common.pooling.ObjectPoolConfiguration original)Validates, copies and updates the originalObjectPoolConfiguration.
-
-
-
Method Detail
-
validate
org.identityconnectors.common.pooling.ObjectPoolConfiguration validate(org.identityconnectors.common.pooling.ObjectPoolConfiguration original)
Validates, copies and updates the originalObjectPoolConfiguration. This class can validate and if necessary it changes theoriginalconfiguration.- Parameters:
original- custom configured instance.- Returns:
- new instance of the
originalconfig.
-
makeObject
T makeObject()
Makes a new instance of the pooled object. This method is called whenever a new instance is needed.- Returns:
- new instance of T.
-
testObject
void testObject(T object)
Tests the borrowed object. This method is invoked on head instances to make sure they can be borrowed from the pool.- Parameters:
object- the pooled object.
-
disposeObject
void disposeObject(T object)
Disposes the object. This method is invoked on every instance when it is being "dropped" from the pool (whether due to the response fromtestObject(Object), or for reasons specific to the pool implementation.)- Parameters:
object- The "dropped" object.
-
shutdown
void shutdown()
Releases any allocated resources. Existing active objects will remain alive and be allowed to shutdown gracefully, but no more objects will be allocated.
-
-