Oracle Application Server 10g Java Object Cache API Reference
10g(9.0.4)

B10388-01

oracle.ias.cache
Interface PoolInstanceFactory

All Known Subinterfaces:
PoolAffinityFactory

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

Method Summary
 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.

 

Method Detail

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

Oracle Application Server 10g Java Object Cache API Reference
10g(9.0.4)

B10388-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.