public class AssocWithThreadResourcePool extends ConnectionPool
_logger, allocator, conCreationRetryInterval_, connectionCreationRetry_, connectionCreationRetryAttempts_, dataStructureParameters, dataStructureType, ds, failAllConnections, gateway, idletime, leakDetector, localStrings, matchConnections, maxConnectionUsage_, maxPoolSize, maxWaitTime, poolInfo, poolInitialized, poolLifeCycleListener, poolWaitQueueClass, preferValidateOverRecreate, reconfigWaitQueue, resizeQuantity, resizerTask, resourceGatewayClass, resourceSelectionStrategyClass, steadyPoolSize, timer, validateAtmostPeriodInMilliSeconds_, validation, waitQueue
Constructor and Description |
---|
AssocWithThreadResourcePool(PoolInfo poolInfo,
Hashtable env) |
Modifier and Type | Method and Description |
---|---|
void |
deleteResource(ResourceHandle resourceHandle)
destroys the resource
|
protected void |
freeUnenlistedResource(ResourceHandle h)
return the resource back to pool only if it is not associated with the thread.
|
protected ResourceHandle |
getUnenlistedResource(ResourceSpec spec,
ResourceAllocator alloc,
Transaction tran)
return resource in free list.
|
protected void |
initializePoolDataStructure() |
protected Resizer |
initializeResizer() |
protected boolean |
isResourceUnused(ResourceHandle h)
check whether the resource is unused
|
protected ResourceHandle |
prefetch(ResourceSpec spec,
ResourceAllocator alloc,
Transaction tran)
Prefetch is called to check whether there there is a free resource is already associated with the thread
Only when prefetch is unable to find a resource, normal routine (getUnenlistedResource) will happen.
|
addResource, blockRequests, cancelResizerTask, cleanupResource, createResource, createResourceAndAddToPool, createSingleResource, createSingleResourceAndAdjustPool, dumpPoolStatus, emptyFreeConnectionsInPool, emptyPool, flushConnectionPool, freeResource, getIdleTimeout, getInvalidConnections, getMaxPoolSize, getPoolConfigurationFromJndi, getPoolInfo, getPoolStatus, getPoolWaitQueue, getReconfigWaitQueue, getReconfigWaitTime, getResizeQuantity, getResource, getResourceFromPool, getSteadyPoolSize, getWaitQueueLength, initializePoolWaitQueue, initializeResourceSelectionStrategy, initPool, internalGetResource, invalidConnectionDetected, isConnectionValid, isSelfManaged, matchConnection, notifyWaitingThreads, performMaxConnectionUsageOperation, potentialConnectionLeakFound, printConnectionLeakTrace, reclaimConnection, reconfigurePool, reconfigureSteadyPoolSize, removePoolLifeCycleListener, resizePool, resourceClosed, resourceEnlisted, resourceErrorOccurred, setMaxPoolSize, setPoolLifeCycleListener, setResourceStateToBusy, setResourceStateToFree, setSelfManaged, setSteadyPoolSize, switchOnMatching, toString, transactionCompleted
public AssocWithThreadResourcePool(PoolInfo poolInfo, Hashtable env) throws PoolingException
PoolingException
protected void initializePoolDataStructure() throws PoolingException
initializePoolDataStructure
in class ConnectionPool
PoolingException
protected ResourceHandle prefetch(ResourceSpec spec, ResourceAllocator alloc, Transaction tran)
prefetch
in class ConnectionPool
spec
- ResourceSpecalloc
- ResourceAllocatortran
- Transactionprotected Resizer initializeResizer()
initializeResizer
in class ConnectionPool
protected boolean isResourceUnused(ResourceHandle h)
isResourceUnused
in class ConnectionPool
h
- ResourceHandleprotected ResourceHandle getUnenlistedResource(ResourceSpec spec, ResourceAllocator alloc, Transaction tran) throws PoolingException
getUnenlistedResource
in class ConnectionPool
spec
- ResourceSpecalloc
- ResourceAllocatortran
- TransactionPoolingException
- Exception while getting resource from poolprotected void freeUnenlistedResource(ResourceHandle h)
freeUnenlistedResource
in class ConnectionPool
h
- ResourceHandlepublic void deleteResource(ResourceHandle resourceHandle)
deleteResource
in interface ResourceHandler
deleteResource
in class ConnectionPool
resourceHandle
- resource to be destroyedCopyright © 2021. All rights reserved.