|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.resource.pool.lib.HArrayPool
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
Constructor Summary | |
HArrayPool()
|
Method Summary | |
void |
check4MaxAge()
check4MaxAge checks the age of the entries and removes them if they are too old |
PoolMatchFactory |
getMatchFactory()
getMatchFactory retrieves the PoolMatchFactory assigned to this Pool. |
int |
getMaxSize()
getMaxSize retrieves the maximum size assigned to 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 |
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)
releaseResource releases a Object in order to allow the Pool to recycle this Object. |
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 |
setMaxSize(int maxsize)
setMaxSize assigns a maximum size to this Pool. |
void |
setMinSize(int minsize)
setMinSize assigns a minimum size to this Pool. |
void |
setTimeout(long crto)
setTimeout assigns a timeout to this Pool. |
void |
validateMCs()
validateMCs validates ManagedConnections in Pool every 10 minutes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HArrayPool()
Method Detail |
public void check4MaxAge()
Pool
check4MaxAge
in interface Pool
Pool.check4MaxAge()
public long getTimeout()
Pool
getTimeout
in interface Pool
Pool.getTimeout()
public int getMinSize()
Pool
getMinSize
in interface Pool
Pool.getMinSize()
public PoolMatchFactory getMatchFactory()
Pool
getMatchFactory
in interface Pool
Pool.getMatchFactory()
public int getMaxSize()
Pool
getMaxSize
in interface Pool
Pool.getMaxSize()
public java.lang.Object getResource(java.lang.Object hints) throws java.lang.Exception
Pool
getResource
in interface Pool
hints
- Some properties to specialise the matching or the creation
of Object.
java.lang.Exception
Pool.getResource(java.lang.Object)
public int getSize()
Pool
getSize
in interface Pool
public void releaseResource(java.lang.Object resource, boolean destroy) throws java.lang.Exception
Pool
releaseResource
in interface Pool
resource
- The Object to be released.destroy
- boolean to remove the object from the pool and
destroy it
java.lang.Exception
Pool.releaseResource(java.lang.Object, boolean)
public void setMaxAge(long _maxAge)
Pool
setMaxAge
in interface Pool
Pool.setMaxAge(long)
public void setInitSize(int initsize) throws java.lang.Exception
Pool
setInitSize
in interface Pool
initsize
- The init size to be created.
java.lang.Exception
Pool.setInitSize(int)
public void setMatchFactory(PoolMatchFactory pmf)
Pool
setMatchFactory
in interface Pool
pmf
- The PoolMatchFactory to be assigned.Pool.setMatchFactory(org.objectweb.jonas.resource.pool.api.PoolMatchFactory)
public void setMaxSize(int maxsize) throws java.lang.Exception
Pool
setMaxSize
in interface Pool
maxsize
- The maximum size to be assigned.
java.lang.Exception
Pool.setMaxSize(int)
public void setMinSize(int minsize) throws java.lang.Exception
Pool
setMinSize
in interface Pool
minsize
- The minimum size to be assigned.
java.lang.Exception
Pool.setMinSize(int)
public void setTimeout(long crto)
Pool
setTimeout
in interface Pool
crto
- The timeout to be assigned.Pool.setTimeout(long)
public void validateMCs() throws java.lang.Exception
Pool
validateMCs
in interface Pool
java.lang.Exception
Pool.validateMCs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |