|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourcePool
The ResourcePool is the manager for a specific set of resource instances.
A new ResourcePool is created for each different descriptor
that is compared using the equals
method.
Based on the minimum resource size, the pool will be initialized with that
many resource instances. The maximum resource size controls the number
of resource instances that will be available at one time.
Nested Class Summary | |
---|---|
static interface |
ResourcePool.Defaults
|
Field Summary | |
---|---|
static java.lang.String |
JDBC_SHARED_CONNECTION_POOL
The well-known pool that is commonly used for the majority of the internal resources/services (i.e., DirectoryService, ConfigurationService, etc.). |
static java.lang.String |
RESOURCE_POOL
The environment property that indicates the name of the pool. |
Method Summary | |
---|---|
void |
checkIn(ResourceContainer resourceContainer,
java.lang.String userName)
Called by the resource container to checkin itself to the pool. |
Resource |
checkOut(java.lang.String userName)
Returns a resource from the pool. |
ComponentTypeID |
getComponentTypeID()
Returns the com.metamatrix.common.config.ComponentTypeID that
identifies the type of pool these statistics represent. |
java.util.Collection |
getPoolResourceStatistics()
Returns a collection of statistics for resources in this pool. |
ResourceAdapter |
getResourceAdapter()
Returns the resource adapter used to create the phyical resource objects. |
ResourceDescriptor |
getResourceDescriptor()
Returns the descriptor from which resources in the were created. |
ResourceDescriptorID |
getResourceDescriptorID()
Returns the resource descriptor ID for this pool that to identify the pool. |
int |
getResourcePoolSize()
Returns the current size of the resource pool. |
ResourcePoolStatistics |
getResourcePoolStatistics()
Returns the monitor for this pool. |
void |
init(ResourceDescriptor descriptor)
Call to initialize the pool based on the descriptor. |
void |
shutDown()
Call to shutDown all the resources in the pool. |
void |
update(java.util.Properties properties)
Call to update the pool management parameters based on the resource descriptor. |
Field Detail |
---|
static final java.lang.String RESOURCE_POOL
static final java.lang.String JDBC_SHARED_CONNECTION_POOL
Method Detail |
---|
void init(ResourceDescriptor descriptor) throws ResourcePoolException
descriptor
- which determines the type of resource and pool size parameters
ResourcePoolException
- is thrown if an error ocurrs during initializationResourceDescriptorID getResourceDescriptorID()
ComponentTypeID getComponentTypeID()
com.metamatrix.common.config.ComponentTypeID
that
identifies the type of pool these statistics represent.
int getResourcePoolSize()
userName
- of who is requesting the resource
ResourceContainers
in the poolResource checkOut(java.lang.String userName) throws ResourcePoolException
userName
- of who is requesting the resource
ResourcePoolException
- is thrown if an error occursvoid checkIn(ResourceContainer resourceContainer, java.lang.String userName) throws ResourcePoolException
resourceContainer
- represents the physical resource instance being removed from the pooluserName
- of who has the resource checked out
ResourcePoolException
- is thrown if an error occursResourceDescriptor getResourceDescriptor()
descriptor
from which resources in the were created.
ResourcePoolStatistics getResourcePoolStatistics()
java.util.Collection getPoolResourceStatistics()
ResourceAdapter getResourceAdapter()
void shutDown()
Resource.shutDown
called.
void update(java.util.Properties properties) throws ResourcePoolException
properties
- are the changes to be applied
ResourcePoolException
- is thrown if an error ocurrs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |