org.objectweb.jonas.resource.pool.lib.HArrayPool Class Reference

Collaboration diagram for org.objectweb.jonas.resource.pool.lib.HArrayPool:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 HArrayPool (Logger logger)
int getCurrentBusy ()
int getCurrentOpened ()
int getInitSize ()
synchronized void setInitSize (int initsize) throws Exception
long getMaxAge ()
void setMaxAge (long maxAge)
long getMaxOpentime ()
void setMaxOpentime (long mx)
int getMaxSize ()
synchronized void setMaxSize (int maxsize) throws Exception
int getMaxWaiters ()
void setMaxWaiters (int nb)
int getMaxWaitTime ()
void setMaxWaitTime (int sec)
int getMinSize ()
synchronized void setMinSize (int minsize) throws Exception
int getSamplingPeriod ()
void setSamplingPeriod (int sec)
int getSize ()
long getTimeout ()
synchronized void setTimeout (long crto)
int getBusyMaxRecent ()
int getBusyMinRecent ()
int getCurrentWaiters ()
int getOpenedCount ()
int getConnectionFailures ()
int getConnectionLeaks ()
int getServedOpen ()
int getRejectedFull ()
int getRejectedTimeout ()
int getRejectedOther ()
int getRejectedOpen ()
int getWaitersHigh ()
int getWaitersHighRecent ()
int getWaiterCount ()
long getWaitingTime ()
long getWaitingHigh ()
long getWaitingHighRecent ()
synchronized Object getResource (Object hints) throws Exception
synchronized void releaseResource (Object resource, boolean destroy, boolean adjustment) throws Exception
PoolMatchFactory getMatchFactory ()
synchronized void setMatchFactory (PoolMatchFactory pmf)
void startMonitor ()
void validateMCs () throws Exception
synchronized void adjust () throws Exception
void recomputeBusy ()
void sampling () throws Exception

Package Functions

void printLists ()

Detailed Description

The class HArrayPool implements a Pool as a HashSet of ManagedConnections, managing free/active resources.

Updated to use an LRU list of free resources

Author: Eric HARDESTY

Definition at line 55 of file HArrayPool.java.


Constructor & Destructor Documentation

org.objectweb.jonas.resource.pool.lib.HArrayPool.HArrayPool Logger  logger  ) 
 

HArrayPool constructor

Parameters:
logger Logger for the pool to use

Definition at line 173 of file HArrayPool.java.


Member Function Documentation

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.adjust  )  throws Exception
 

Adjust the pool size, according to poolMax and minSize values. Also remove old connections in the freeList.

Exceptions:
Exception if an exception occurs

Definition at line 816 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.api.PoolItemStats.getMaxOpenTimeout(), org.objectweb.jonas.resource.pool.lib.HArrayPool.recomputeBusy(), and org.objectweb.jonas.resource.pool.lib.HArrayPool.releaseResource().

Referenced by org.objectweb.jonas.resource.pool.lib.HArrayPool.releaseResource(), org.objectweb.jonas.resource.pool.lib.HArrayPool.setMaxSize(), and org.objectweb.jonas.resource.pool.lib.HArrayPool.setMinSize().

Here is the call graph for this function:

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getBusyMaxRecent  ) 
 

Returns:
maximum nb of busy connections in last sampling period

Definition at line 415 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getBusyMinRecent  ) 
 

Returns:
minimum nb of busy connections in last sampling period

Definition at line 427 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getConnectionFailures  ) 
 

Returns:
int number of connection failures on open

Definition at line 463 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getConnectionLeaks  ) 
 

Returns:
int number of connection leaks

Definition at line 477 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getCurrentBusy  ) 
 

Returns:
int number of busy connections

Definition at line 188 of file HArrayPool.java.

Referenced by org.objectweb.jonas.resource.pool.lib.HArrayPool.recomputeBusy(), and org.objectweb.jonas.resource.pool.lib.HArrayPool.sampling().

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getCurrentOpened  ) 
 

Returns:
int number of opened connections

Definition at line 195 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.getSize().

Here is the call graph for this function:

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getCurrentWaiters  ) 
 

Returns:
current number of connection waiters

Definition at line 439 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getInitSize  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool#getInitSize

Definition at line 202 of file HArrayPool.java.

PoolMatchFactory org.objectweb.jonas.resource.pool.lib.HArrayPool.getMatchFactory  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.getMatchFactory

Definition at line 785 of file HArrayPool.java.

long org.objectweb.jonas.resource.pool.lib.HArrayPool.getMaxAge  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool#getMaxAge

Definition at line 249 of file HArrayPool.java.

long org.objectweb.jonas.resource.pool.lib.HArrayPool.getMaxOpentime  ) 
 

Returns:
max age for connections (in mns)

Definition at line 266 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getMaxSize  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.getMaxSize

Definition at line 280 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getMaxWaiters  ) 
 

Returns:
max nb of waiters

Definition at line 313 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getMaxWaitTime  ) 
 

Returns:
waiter timeout in seconds

Definition at line 327 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getMinSize  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.getMinSize

Definition at line 341 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getOpenedCount  ) 
 

Returns:
int number of physical jdbc connection opened

Definition at line 451 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getRejectedFull  ) 
 

Returns:
int number of open calls that were rejected due to waiter overflow

Definition at line 501 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getRejectedOpen  ) 
 

Returns:
int number of open calls that were rejected

Definition at line 532 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getRejectedOther  ) 
 

Returns:
int number of open calls that were rejected

Definition at line 525 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getRejectedTimeout  ) 
 

Returns:
int number of open calls that were rejected by timeout

Definition at line 513 of file HArrayPool.java.

synchronized Object org.objectweb.jonas.resource.pool.lib.HArrayPool.getResource Object  hints  )  throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.getResource

Definition at line 613 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.printLists(), and org.objectweb.jonas.resource.pool.lib.HArrayPool.recomputeBusy().

Here is the call graph for this function:

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getSamplingPeriod  ) 
 

Returns:
sampling period in sec.

Definition at line 366 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getServedOpen  ) 
 

Returns:
int number of connection served

Definition at line 489 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getSize  ) 
 

Get the size of the pool

Returns:
int size of the pool

Definition at line 384 of file HArrayPool.java.

Referenced by org.objectweb.jonas.resource.pool.lib.HArrayPool.getCurrentOpened().

long org.objectweb.jonas.resource.pool.lib.HArrayPool.getTimeout  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.getTimeout

Definition at line 391 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getWaiterCount  ) 
 

Returns:
total nb of waiters since the datasource creation

Definition at line 568 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getWaitersHigh  ) 
 

Returns:
maximum nb of waiters since the datasource creation

Definition at line 544 of file HArrayPool.java.

int org.objectweb.jonas.resource.pool.lib.HArrayPool.getWaitersHighRecent  ) 
 

Returns:
maximum nb of waiters in last sampling period

Definition at line 556 of file HArrayPool.java.

long org.objectweb.jonas.resource.pool.lib.HArrayPool.getWaitingHigh  ) 
 

Returns:
max waiting time since the datasource creation

Definition at line 592 of file HArrayPool.java.

long org.objectweb.jonas.resource.pool.lib.HArrayPool.getWaitingHighRecent  ) 
 

Returns:
max waiting time in last sampling period

Definition at line 604 of file HArrayPool.java.

long org.objectweb.jonas.resource.pool.lib.HArrayPool.getWaitingTime  ) 
 

Returns:
total waiting time since the datasource creation

Definition at line 580 of file HArrayPool.java.

void org.objectweb.jonas.resource.pool.lib.HArrayPool.printLists  )  [package]
 

Print information about the pool

Definition at line 969 of file HArrayPool.java.

Referenced by org.objectweb.jonas.resource.pool.lib.HArrayPool.getResource().

void org.objectweb.jonas.resource.pool.lib.HArrayPool.recomputeBusy  ) 
 

compute current min/max busyConnections

Definition at line 912 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.getCurrentBusy().

Referenced by org.objectweb.jonas.resource.pool.lib.HArrayPool.adjust(), and org.objectweb.jonas.resource.pool.lib.HArrayPool.getResource().

Here is the call graph for this function:

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.releaseResource Object  resource,
boolean  destroy,
boolean  adjustment
throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.releaseResource

Definition at line 746 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.adjust(), org.objectweb.jonas.resource.pool.api.PoolItemStats.getStartTime(), and org.objectweb.jonas.resource.pool.api.PoolItemStats.setTotalConnectionTime().

Referenced by org.objectweb.jonas.resource.pool.lib.HArrayPool.adjust().

Here is the call graph for this function:

void org.objectweb.jonas.resource.pool.lib.HArrayPool.sampling  )  throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.sampling

Definition at line 925 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.getCurrentBusy().

Here is the call graph for this function:

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.setInitSize int  initsize  )  throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.setInitSize

Definition at line 209 of file HArrayPool.java.

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMatchFactory PoolMatchFactory  pmf  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.setMatchFactory

Definition at line 792 of file HArrayPool.java.

void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMaxAge long  maxAge  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.setMaxAge

Definition at line 256 of file HArrayPool.java.

void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMaxOpentime long  mx  ) 
 

Parameters:
mx max time of open connection in milliseconds

Definition at line 273 of file HArrayPool.java.

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMaxSize int  maxsize  )  throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.setMaxSize

Definition at line 287 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.adjust().

Here is the call graph for this function:

void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMaxWaiters int  nb  ) 
 

Parameters:
nb max nb of waiters

Definition at line 320 of file HArrayPool.java.

void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMaxWaitTime int  sec  ) 
 

Parameters:
sec max time to wait for a connection, in seconds

Definition at line 334 of file HArrayPool.java.

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.setMinSize int  minsize  )  throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.setMinSize

Definition at line 348 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPool.adjust().

Here is the call graph for this function:

void org.objectweb.jonas.resource.pool.lib.HArrayPool.setSamplingPeriod int  sec  ) 
 

Parameters:
sec sampling period in sec.

Definition at line 373 of file HArrayPool.java.

References org.objectweb.jonas.resource.pool.lib.HArrayPoolMonitor.setSamplingPeriod().

Here is the call graph for this function:

synchronized void org.objectweb.jonas.resource.pool.lib.HArrayPool.setTimeout long  crto  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.setTimeout

Definition at line 398 of file HArrayPool.java.

void org.objectweb.jonas.resource.pool.lib.HArrayPool.startMonitor  ) 
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.startMonitor

Definition at line 799 of file HArrayPool.java.

void org.objectweb.jonas.resource.pool.lib.HArrayPool.validateMCs  )  throws Exception
 

See also:
org.objectweb.jonas.resource.pool.api.Pool.validateMCs

Definition at line 807 of file HArrayPool.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:07:35 2005 for JOnAS by  doxygen 1.3.9.1