Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.7.0)

E10653-08

oracle.jbo.server
Class QueryCollectionPool

java.lang.Object
  extended by oracle.jbo.pool.ResourcePool
      extended by oracle.jbo.server.QueryCollectionPool

public class QueryCollectionPool
extends ResourcePool

This class maintains strong references to QueryCollection's in shared AM.


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.jbo.pool.ResourcePool
ResourcePool.AvailableListSelector
 
Field Summary
 
Fields inherited from class oracle.jbo.pool.ResourcePool
MAX_WAIT_TIME, MAX_WEIGHT_DEFAULT, mLock, mLogger, WAIT_TIME_INCREMENT
 
Method Summary
protected  ResourcePoolLogger createPoolLogger()
           
 void dumpPoolStatistics(java.io.PrintWriter pw)
          Dump pool statistics to the specified printwriter.
protected  int getMaxAvailableSize()
          Return the maximum number of available instances that should exist in the pool after pool garbage collection.
protected  int getMaxInactiveAge()
          Return the duration in milliseconds that a resource may remain available before it is considered inactive.
protected  double getMaxWeight()
          Returns the maximum weight allowed in the query collection pool.
protected  int getMinAvailableSize()
          Return the minimum number of available instances that should exist in the pool after pool garbage collection.
protected  java.lang.Object getResourcePoolKey()
           
protected  int getTimeToLive()
          Return the duration in milliseconds that a resource may remain in the pool.
protected  double getWeight(ResourceInfo resourceInfo)
          Calculates the weight of the resource.
 java.lang.Object instantiateResource(java.util.Properties properties)
          Instantiate a new pooled resource.
 java.lang.Object removeResource(java.lang.Object resource)
          Remove a resource from the pool.
 
Methods inherited from class oracle.jbo.pool.ResourcePool
addResource, addToRemoveList, allocateResource, beforeResourceFinalized, canAllocateResource, canFinalizeResource, canRemoveResource, createInitializer, createResource, decrementRefCount, destroy, finalizeResource, getAvailableResourceCount, getCreationTimeMillis, getInitializer, getInitPoolSize, getLastUpdate, getLRUAvailableIterator, getMaxPoolSize, getMaxWaitTime, getMRUAvailableIterator, getName, getRefCount, getResource, getResourceCount, getResourceDetails, getResourceInfo, getResourcePoolStatistics, getState, getSyncLock, getTimeToCreateMillis, hasResource, incrementRefCount, initialize, isAvailable, isSuspended, isUseExclusive, logPoolEvent, markResourcesForRemove, prepareForGCRemove, prepareForGCRemove, prepareResource, releaseResource, removeFromManager, removeResourceInternal, removeResources, resourceStateChanged, resumeResource, seekLRUAvailableResource, seekMRUAvailableResource, setAvailable, setAvailable, setState, suspendResource, useResource, wakeup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

removeResource

public java.lang.Object removeResource(java.lang.Object resource)
Description copied from class: ResourcePool
Remove a resource from the pool.

Overrides:
removeResource in class ResourcePool

instantiateResource

public java.lang.Object instantiateResource(java.util.Properties properties)
Description copied from class: ResourcePool
Instantiate a new pooled resource. Invoked by ResourcePool.useResource(Properties) if it is necessary to create a new pooled resource. Applications should implement this method to return a new instance of a pooled resource.

Specified by:
instantiateResource in class ResourcePool

createPoolLogger

protected ResourcePoolLogger createPoolLogger()
Overrides:
createPoolLogger in class ResourcePool

getResourcePoolKey

protected java.lang.Object getResourcePoolKey()
Specified by:
getResourcePoolKey in class ResourcePool

getMaxInactiveAge

protected int getMaxInactiveAge()
Description copied from class: ResourcePool
Return the duration in milliseconds that a resource may remain available before it is considered inactive. Inactive resources are always removed from the pool until the pool minimum available size has been reached.

Overrides:
getMaxInactiveAge in class ResourcePool
See Also:
ResourcePool.getMinAvailableSize()

getMinAvailableSize

protected int getMinAvailableSize()
Description copied from class: ResourcePool
Return the minimum number of available instances that should exist in the pool after pool garbage collection. Pool garbage collection will remove inactive, available resources until there are no inactive, available resources to be removed or until the minimum available pool size has been reached.

An available resource is defined as inactive if it has not been used for a duration longer than the pool's maximum inactive age.

Overrides:
getMinAvailableSize in class ResourcePool
See Also:
ResourcePool.getMaxInactiveAge()

getMaxAvailableSize

protected int getMaxAvailableSize()
Description copied from class: ResourcePool
Return the maximum number of available instances that should exist in the pool after pool garbage collection. Pool garbage collection will remove available resources until there are no available resources to be removed or until the maximum available pool size has been reached.

Overrides:
getMaxAvailableSize in class ResourcePool

getTimeToLive

protected int getTimeToLive()
Description copied from class: ResourcePool
Return the duration in milliseconds that a resource may remain in the pool.

Overrides:
getTimeToLive in class ResourcePool

getMaxWeight

protected double getMaxWeight()
Returns the maximum weight allowed in the query collection pool. If the total weight of the resources (query collections) in the pool exceeds the specified maximum, the resources will be removed in LRU basis during the pool cleanup until it falls below the limit.

Overrides:
getMaxWeight in class ResourcePool
See Also:
getMaxWeight()

getWeight

protected double getWeight(ResourceInfo resourceInfo)
Calculates the weight of the resource. By default, the query collection's fetched row size is returned.

Overrides:
getWeight in class ResourcePool
Parameters:
resourceInfo - the resource to evaluate
Returns:
the weight of the resource
See Also:
getWeight(ResourceInfo)

dumpPoolStatistics

public void dumpPoolStatistics(java.io.PrintWriter pw)
Description copied from class: ResourcePool
Dump pool statistics to the specified printwriter. This call delegates to the pool logger which was created an registered with the pool when the pool was initialized.

Overrides:
dumpPoolStatistics in class ResourcePool
See Also:
ResourcePool.createPoolLogger()

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.7.0)

E10653-08

Copyright © 1997, 2013, Oracle. All rights reserved.