|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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:
Method Summary | |
void |
adjust()
adjust checks the age of the entries and removes them if they are too old |
PoolMatchFactory |
getMatchFactory()
getMatchFactory retrieves the PoolMatchFactory assigned to this Pool. |
long |
getMaxOpentime()
getMaxOpentime gets the max age for a pool entry |
int |
getMaxSize()
getMaxSize retrieves the maximum size assigned to this Pool. |
int |
getMaxWaiters()
getMaxWaiters gets the maximum number of waiters for a connection in this Pool. |
int |
getMaxWaitTime()
getMaxWaitTime gets the maximum number of seconds to wait for a connection in this Pool. |
int |
getMinSize()
getMinSize retrieves the minimum size assigned to this Pool. |
java.lang.Object |
getResource(java.lang.Object hints)
getResource is used to allocate a Object from the Pool. |
int |
getSamplingPeriod()
getSamplingPeriod gets the number of seconds between statistics sampling for this Pool. |
int |
getSize()
getSize retrieves the current size of this Pool. |
long |
getTimeout()
getTimeout retrieves the timeout assigned to this Pool. |
void |
releaseResource(java.lang.Object resource,
boolean destroy,
boolean adjustment)
releaseResource releases a Object in order to allow the Pool to recycle this Object. |
void |
sampling()
sampling updates the interval pool information |
void |
setInitSize(int initsize)
setInitSize creates initsize resoures to this Pool. |
void |
setMatchFactory(PoolMatchFactory pmf)
setMatchFactory assigns a PoolMatchFactory to this Pool. |
void |
setMaxAge(long maxAge)
setMaxAge sets the max age for a pool entry |
void |
setMaxOpentime(long maxOpentime)
setMaxOpentime sets the max age for a pool entry |
void |
setMaxSize(int maxsize)
setMaxSize assigns a maximum size to this Pool. |
void |
setMaxWaiters(int maxWaiters)
setMaxWaiters sets the maximum number of waiters for a connection in this Pool. |
void |
setMaxWaitTime(int maxWaitTime)
setMaxWaitTime sets the maximum number of seconds to wait for a connection in this Pool. |
void |
setMinSize(int minsize)
setMinSize assigns a minimum size to this Pool. |
void |
setSamplingPeriod(int samplingPeriod)
setSamplingPeriod sets the number of seconds between statistics sampling for this Pool. |
void |
setTimeout(long crto)
setTimeout assigns a timeout to this Pool. |
void |
startMonitor()
startMonitor starts the pool monitor for this Pool. |
void |
validateMCs()
validateMCs validates ManagedConnections in Pool every 10 minutes |
Method Detail |
public void adjust() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic PoolMatchFactory getMatchFactory()
public long getMaxOpentime()
public int getMaxSize()
public int getMaxWaiters()
public int getMaxWaitTime()
public int getMinSize()
public java.lang.Object getResource(java.lang.Object hints) throws java.lang.Exception
hints
- Some properties to specialise the matching or the creation
of Object.
java.lang.Exception
- if an error occurspublic int getSamplingPeriod() throws java.lang.Exception
java.lang.Exception
public long getTimeout()
public int getSize()
public void releaseResource(java.lang.Object resource, boolean destroy, boolean adjustment) throws java.lang.Exception
resource
- The Object to be released.destroy
- boolean to remove the object from the pool and
destroy itadjustment
- boolean to determine if a pool adjustment should be done
java.lang.Exception
- if an error occurspublic void sampling() throws java.lang.Exception
java.lang.Exception
- if an error occurspublic void setInitSize(int initsize) throws java.lang.Exception
initsize
- The init size to be created.
java.lang.Exception
- if an error occurspublic void setMatchFactory(PoolMatchFactory pmf)
pmf
- The PoolMatchFactory to be assigned.public void setMaxAge(long maxAge)
maxAge
- long max number of milliseconds to keep a connection
in the pool.public void setMaxOpentime(long maxOpentime)
maxOpentime
- long max number of minutes to keep a connection
in the pool.public void setMaxSize(int maxsize) throws java.lang.Exception
maxsize
- int maximum size to be assigned.
java.lang.Exception
- if an error occurspublic void setMaxWaiters(int maxWaiters) throws java.lang.Exception
maxWaiters
- int maximum number of waiters
java.lang.Exception
- if an error occurspublic void setMaxWaitTime(int maxWaitTime) throws java.lang.Exception
maxWaitTime
- int maximum number of seconds to wait
java.lang.Exception
- if an error occurspublic void setMinSize(int minsize) throws java.lang.Exception
minsize
- int minimum size to be assigned.
java.lang.Exception
- if an error occurspublic void setSamplingPeriod(int samplingPeriod) throws java.lang.Exception
samplingPeriod
- int number of seconds between samplings
java.lang.Exception
- if an error occurspublic void setTimeout(long crto)
crto
- long timeout to be assigned.public void startMonitor()
public void validateMCs() throws java.lang.Exception
java.lang.Exception
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |