org.objectweb.jonas.resource.pool.api.Pool Interface Reference

List of all members.

Public Member Functions

void adjust () throws Exception

Package Functions

PoolMatchFactory getMatchFactory ()
long getMaxOpentime ()
int getMaxSize ()
int getMaxWaiters ()
int getMaxWaitTime ()
int getMinSize ()
Object getResource (Object hints) throws Exception
int getSamplingPeriod () throws Exception
long getTimeout ()
int getSize ()
void releaseResource (Object resource, boolean destroy, boolean adjustment) throws Exception
void sampling () throws Exception
void setInitSize (int initsize) throws Exception
void setMatchFactory (PoolMatchFactory pmf)
void setMaxAge (long maxAge)
void setMaxOpentime (long maxOpentime)
void setMaxSize (int maxsize) throws Exception
void setMaxWaiters (int maxWaiters) throws Exception
void setMaxWaitTime (int maxWaitTime) throws Exception
void setMinSize (int minsize) throws Exception
void setSamplingPeriod (int samplingPeriod) throws Exception
void setTimeout (long crto)
void startMonitor ()
void validateMCs () throws Exception

Detailed Description

The interface Pool defines an object that pools resources of any kind. Resources must be requested (getResource) and released (releaseResource) on demand. A Pool object can be parameterized along different dimensions. All these dimensions are represented by accessor methods (getters and setters) assigned to each of them:

Definition at line 81 of file Pool.java.


Member Function Documentation

void org.objectweb.jonas.resource.pool.api.Pool.adjust  )  throws Exception
 

adjust checks the age of the entries and removes them if they are too old

Exceptions:
Exception if an error occurs

PoolMatchFactory org.objectweb.jonas.resource.pool.api.Pool.getMatchFactory  )  [package]
 

getMatchFactory retrieves the PoolMatchFactory assigned to this Pool.

Returns:
The PoolMatchFactory currently assigned to this Pool.

long org.objectweb.jonas.resource.pool.api.Pool.getMaxOpentime  )  [package]
 

getMaxOpentime gets the max age for a pool entry

Returns:
long max number of minutes to keep a connection in the pool.

int org.objectweb.jonas.resource.pool.api.Pool.getMaxSize  )  [package]
 

getMaxSize retrieves the maximum size assigned to this Pool.

Returns:
The maximum size currently assigned to this Pool.

int org.objectweb.jonas.resource.pool.api.Pool.getMaxWaiters  )  [package]
 

getMaxWaiters gets the maximum number of waiters for a connection in this Pool.

Parameters:
return int maximum number of waiters

int org.objectweb.jonas.resource.pool.api.Pool.getMaxWaitTime  )  [package]
 

getMaxWaitTime gets the maximum number of seconds to wait for a connection in this Pool.

Returns:
int maximum number of seconds to wait

int org.objectweb.jonas.resource.pool.api.Pool.getMinSize  )  [package]
 

getMinSize retrieves the minimum size assigned to this Pool.

Returns:
The minimum size currently assigned to this Pool.

Object org.objectweb.jonas.resource.pool.api.Pool.getResource Object  hints  )  throws Exception [package]
 

getResource is used to allocate a Object from the Pool. Some hints are passed in order to specialise the matching or creation of Object.

Parameters:
hints Some properties to specialise the matching or the creation of Object.
Returns:
The Object allocated from the Pool.
Exceptions:
Exception if an error occurs

int org.objectweb.jonas.resource.pool.api.Pool.getSamplingPeriod  )  throws Exception [package]
 

getSamplingPeriod gets the number of seconds between statistics sampling for this Pool.

Returns:
int number of seconds between samplings

int org.objectweb.jonas.resource.pool.api.Pool.getSize  )  [package]
 

getSize retrieves the current size of this Pool.

Returns:
The current size of this Pool.

long org.objectweb.jonas.resource.pool.api.Pool.getTimeout  )  [package]
 

getTimeout retrieves the timeout assigned to this Pool.

Returns:
The timeout currently assigned to this Pool.

void org.objectweb.jonas.resource.pool.api.Pool.releaseResource Object  resource,
boolean  destroy,
boolean  adjustment
throws Exception [package]
 

releaseResource releases a Object in order to allow the Pool to recycle this Object.

Parameters:
resource The Object to be released.
destroy boolean to remove the object from the pool and destroy it
adjustment boolean to determine if a pool adjustment should be done
Exceptions:
Exception if an error occurs

Referenced by org.objectweb.jonas.resource.MySynchro.afterCompletion().

void org.objectweb.jonas.resource.pool.api.Pool.sampling  )  throws Exception [package]
 

sampling updates the interval pool information

Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setInitSize int  initsize  )  throws Exception [package]
 

setInitSize creates initsize resoures to this Pool.

Parameters:
initsize The init size to be created.
Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setMatchFactory PoolMatchFactory  pmf  )  [package]
 

setMatchFactory assigns a PoolMatchFactory to this Pool.

Parameters:
pmf The PoolMatchFactory to be assigned.

void org.objectweb.jonas.resource.pool.api.Pool.setMaxAge long  maxAge  )  [package]
 

setMaxAge sets the max age for a pool entry

Parameters:
maxAge long max number of milliseconds to keep a connection in the pool.

void org.objectweb.jonas.resource.pool.api.Pool.setMaxOpentime long  maxOpentime  )  [package]
 

setMaxOpentime sets the max age for a pool entry

Parameters:
maxOpentime long max number of minutes to keep a connection in the pool.

void org.objectweb.jonas.resource.pool.api.Pool.setMaxSize int  maxsize  )  throws Exception [package]
 

setMaxSize assigns a maximum size to this Pool.

Parameters:
maxsize int maximum size to be assigned.
Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setMaxWaiters int  maxWaiters  )  throws Exception [package]
 

setMaxWaiters sets the maximum number of waiters for a connection in this Pool.

Parameters:
maxWaiters int maximum number of waiters
Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setMaxWaitTime int  maxWaitTime  )  throws Exception [package]
 

setMaxWaitTime sets the maximum number of seconds to wait for a connection in this Pool.

Parameters:
maxWaitTime int maximum number of seconds to wait
Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setMinSize int  minsize  )  throws Exception [package]
 

setMinSize assigns a minimum size to this Pool.

Parameters:
minsize int minimum size to be assigned.
Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setSamplingPeriod int  samplingPeriod  )  throws Exception [package]
 

setSamplingPeriod sets the number of seconds between statistics sampling for this Pool.

Parameters:
samplingPeriod int number of seconds between samplings
Exceptions:
Exception if an error occurs

void org.objectweb.jonas.resource.pool.api.Pool.setTimeout long  crto  )  [package]
 

setTimeout assigns a timeout to this Pool.

Parameters:
crto long timeout to be assigned.

void org.objectweb.jonas.resource.pool.api.Pool.startMonitor  )  [package]
 

startMonitor starts the pool monitor for this Pool.

void org.objectweb.jonas.resource.pool.api.Pool.validateMCs  )  throws Exception [package]
 

validateMCs validates ManagedConnections in Pool every 10 minutes

Exceptions:
Exception if an error occurs


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