Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.thin.beans.graph
Class PoolDispatcher

java.lang.Object
  |
  +--oracle.dss.thin.beans.graph.PoolDispatcher
Direct Known Subclasses:
GraphPool

public class PoolDispatcher
extends java.lang.Object

Class responsible for pooling object instances


Field Summary
static int DEF_INITIAL_SIZE
          Default number of pooled objects allocated when pool is created
static int DEF_INSTANCE_INCR
          Default number of instances allocated at once when pool is growing
static int DEF_MAX_SIZE
          Default maximum number of pooled objects to be allocated
static int DEF_NORM_SIZE
          Default number of pooled objects that should remain allocated when there are no outstanding requests
static float DEF_QUEUE_RATIO
          Default ratio between the number of outstanding requests and and the total number of pooled obejcts when the pool should start growing

 

Constructor Summary
PoolDispatcher(PoolObjectFactory factory)
          Constructor.
PoolDispatcher(PoolObjectFactory factory, java.lang.ClassLoader threadClassLoader)
          Constructor.
PoolDispatcher(PoolObjectFactory factory, int init_size, int norm_size, int max_size, int inst_incr, float queue_ratio)
          Constructor.
PoolDispatcher(PoolObjectFactory factory, int init_size, int norm_size, int max_size, int inst_incr, float queue_ratio, java.lang.ClassLoader threadClassLoader)
          Constructor.

 

Method Summary
 void cleanup()
          Cleans up all allocated objects and terminates the new instance thread The application may not request any new objects from the pool after this call
 java.lang.String dump()
          Retrieves a dump of pool state
 java.lang.Object get()
          Retrieves an instance of pooled object.
 void release(java.lang.Object obj)
          Returns an object to the pool

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

DEF_INITIAL_SIZE

public static final int DEF_INITIAL_SIZE
Default number of pooled objects allocated when pool is created

DEF_NORM_SIZE

public static final int DEF_NORM_SIZE
Default number of pooled objects that should remain allocated when there are no outstanding requests

DEF_MAX_SIZE

public static final int DEF_MAX_SIZE
Default maximum number of pooled objects to be allocated

DEF_INSTANCE_INCR

public static final int DEF_INSTANCE_INCR
Default number of instances allocated at once when pool is growing

DEF_QUEUE_RATIO

public static final float DEF_QUEUE_RATIO
Default ratio between the number of outstanding requests and and the total number of pooled obejcts when the pool should start growing
Constructor Detail

PoolDispatcher

public PoolDispatcher(PoolObjectFactory factory)
Constructor. Creates pool dispatcher with default configuration parameters
Parameters:
factory - An instance of PoolObjectFactory
See Also:
DEF_INITIAL_SIZE, DEF_NORM_SIZE, DEF_MAX_SIZE, DEF_INSTANCE_INCR, DEF_QUEUE_RATIO, PoolObjectFactory

PoolDispatcher

public PoolDispatcher(PoolObjectFactory factory,
                      java.lang.ClassLoader threadClassLoader)
Constructor. Creates pool dispatcher with default configuration parameters
Parameters:
factory - An instance of PoolObjectFactory
threadClassLoader - class loader used in the thread that allocates new object instances
See Also:
DEF_INITIAL_SIZE, DEF_NORM_SIZE, DEF_MAX_SIZE, DEF_INSTANCE_INCR, DEF_QUEUE_RATIO, PoolObjectFactory

PoolDispatcher

public PoolDispatcher(PoolObjectFactory factory,
                      int init_size,
                      int norm_size,
                      int max_size,
                      int inst_incr,
                      float queue_ratio,
                      java.lang.ClassLoader threadClassLoader)
Constructor. Creates pool dispatcher
Parameters:
factory - An instance of PoolObjectFactory
init_size - The number of pooled objects allocated when pool is created
norm_size - The number of pooled objects that should remain allocated when there are no outstanding requests
max_size - Maximum number of pooled objects to be allocated
inst_incr - Number of instances allocated at once when pool is growing
queue_ratio - A ratio between the number of outstanding requests and and the total number of pooled obejcts when the pool should start growing
threadClassLoader - class loader used in the thread that allocates new object instances
See Also:
PoolObjectFactory

PoolDispatcher

public PoolDispatcher(PoolObjectFactory factory,
                      int init_size,
                      int norm_size,
                      int max_size,
                      int inst_incr,
                      float queue_ratio)
Constructor. Creates pool dispatcher
Parameters:
factory - An instance of PoolObjectFactory
init_size - The number of pooled objects allocated when pool is created
norm_size - The number of pooled objects that should remain allocated when there are no outstanding requests
max_size - Maximum number of pooled objects to be allocated
inst_incr - Number of instances allocated at once when pool is growing
queue_ratio - A ratio between the number of outstanding requests and and the total number of pooled obejcts when the pool should start growing
See Also:
PoolObjectFactory
Method Detail

get

public java.lang.Object get()
Retrieves an instance of pooled object. Will not return until such instance is available
Returns:
pooled object

release

public void release(java.lang.Object obj)
Returns an object to the pool
Parameters:
An - object to be returned

cleanup

public void cleanup()
Cleans up all allocated objects and terminates the new instance thread The application may not request any new objects from the pool after this call

dump

public java.lang.String dump()
Retrieves a dump of pool state
Returns:
pool state

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.