oracle.ias.cache
Interface PoolInstanceFactory
- public interface PoolInstanceFactory
PoolInstanceFactory is an interface for generating and destroying
the instances of objects in a pool. Two methods are defined, one
for creating objects in a pool the other for destroying them. An object
implementing this interface is passed as a parameter of the
PoolAccess.createPool method.
The createInstance method is called to created the instances in the pool,
the destroyInstance method is called for each instance in the pool, when
the instance is destroyed.
- Since:
- 2.0.0
Type | Method |
java.lang.Object |
createInstance()
CreateInstance creates an instance of the object to be pooled. |
void |
destroyInstance(java.lang.Object obj)
DestroyInstance is called when a pooled object is being removed from the
pool. |
createInstance
public java.lang.Object createInstance()
- CreateInstance creates an instance of the object to be pooled.
- Returns:
- an object instance which will be stored in the pool
- Since:
- 2.0.0
- See Also:
CacheAccess.createPool
destroyInstance
public void destroyInstance(java.lang.Object obj)
- DestroyInstance is called when a pooled object is being removed from the
pool. It is called once for each instance of the object in the pool.
- Parameters:
obj
- the object instance which is being removed from the pool- Since:
- 2.0.0
- See Also:
CacheAccess.createPool