Class AssocWithThreadPoolResizer
- java.lang.Object
-
- java.util.TimerTask
-
- com.sun.enterprise.resource.pool.resizer.Resizer
-
- com.sun.enterprise.resource.pool.resizer.AssocWithThreadPoolResizer
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.resource.pool.resizer.Resizer
_logger, dataStructure, handler, pool, poolInfo, preferValidateOverRecreate
-
-
Constructor Summary
Constructors Constructor Description AssocWithThreadPoolResizer(PoolInfo poolInfo, DataStructure ds, PoolProperties pp, ResourceHandler handler, boolean preferValidateOverRecreate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
removeIdleAndInvalidResources()
Get the free connections list from the pool, remove idle-timed-out resources and then invalid resources.protected void
scaleDownPool(int scaleDownQuantity, boolean forced)
Scale down pool by asize <= pool-resize-quantity
-
Methods inherited from class com.sun.enterprise.resource.pool.resizer.Resizer
debug, isResourceEligibleForRemoval, resizePool, run, validateAndRemoveResource
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Constructor Detail
-
AssocWithThreadPoolResizer
public AssocWithThreadPoolResizer(PoolInfo poolInfo, DataStructure ds, PoolProperties pp, ResourceHandler handler, boolean preferValidateOverRecreate)
-
-
Method Detail
-
scaleDownPool
protected void scaleDownPool(int scaleDownQuantity, boolean forced)
Scale down pool by asize <= pool-resize-quantity
- Overrides:
scaleDownPool
in classResizer
- Parameters:
forced
- scale-down only when forcedscaleDownQuantity
- no. of resources to remove
-
removeIdleAndInvalidResources
protected int removeIdleAndInvalidResources()
Get the free connections list from the pool, remove idle-timed-out resources and then invalid resources.- Overrides:
removeIdleAndInvalidResources
in classResizer
- Returns:
- int number of resources removed
-
-