|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.perseus.pool.lib.LArrayPool
The class LArrayPool implements a Pool as an array of PoolResource, managing free/active resources through lists of cells encapsulating the resources.
Field Summary | |
---|---|
static java.lang.String |
POOL_MATCH_FACTORY_BINDING
|
Constructor Summary | |
---|---|
LArrayPool()
|
Method Summary | |
---|---|
void |
bindFc(java.lang.String clientItfName,
java.lang.Object serverItf)
|
int |
getFreeResourceNumber()
|
long |
getInactiveTTL()
getTTL retrieves the time to live of pool resources when they are unused (in milisecond). |
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 PoolResource from the Pool. |
java.lang.Object |
getResource(java.lang.Object hints,
java.lang.Object user)
getResource is used to allocate a PoolResource from the Pool. |
int |
getSize()
|
long |
getTimeout()
getTimeout retrieves the timeout assigned to this Pool. |
long |
getTTL()
getTTL retrieves the time to live of pool resources (in milisecond). |
int |
getUsedResourceNumber()
|
java.util.Collection |
getUsers()
|
java.lang.String[] |
listFc()
|
java.lang.Object |
lookupFc(java.lang.String clientItfName)
|
void |
releaseResource(java.lang.Object resource)
releaseResource releases a PoolResource in order to allow the Pool to recycle this PoolResource. |
void |
setInactiveTTL(long ttl)
setTTL assignes the time (in milisecond) to live of pool resources when they are unused. |
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 |
setTTL(long ttl)
setTTL assignes the time (in milisecond) to live of pool resources. |
void |
unbindFc(java.lang.String clientItfName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String POOL_MATCH_FACTORY_BINDING
Constructor Detail |
public LArrayPool()
Method Detail |
public java.lang.String[] listFc()
public java.lang.Object lookupFc(java.lang.String clientItfName)
public void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
public void unbindFc(java.lang.String clientItfName)
public long getTimeout()
PoolAttributes
getTimeout
in interface PoolAttributes
public int getMinSize()
PoolAttributes
getMinSize
in interface PoolAttributes
public int getMaxSize()
PoolAttributes
getMaxSize
in interface PoolAttributes
public void setTimeout(long crto)
PoolAttributes
setTimeout
in interface PoolAttributes
crto
- The timeout to be assigned.public void setMinSize(int minsize)
PoolAttributes
setMinSize
in interface PoolAttributes
minsize
- The minimum size to be assigned.public void setMaxSize(int maxsize)
PoolAttributes
setMaxSize
in interface PoolAttributes
maxsize
- The maximum size to be assigned.public long getTTL()
PoolAttributes
getTTL
in interface PoolAttributes
public void setTTL(long ttl)
PoolAttributes
setTTL
in interface PoolAttributes
public long getInactiveTTL()
PoolAttributes
getInactiveTTL
in interface PoolAttributes
public void setInactiveTTL(long ttl)
PoolAttributes
setInactiveTTL
in interface PoolAttributes
public java.lang.Object getResource(java.lang.Object hints) throws PoolException
Pool
getResource
in interface Pool
hints
- Some properties to specialise the matching or the creation
of PoolResource.
PoolException
public java.lang.Object getResource(java.lang.Object hints, java.lang.Object user) throws PoolException
Pool
getResource
in interface Pool
hints
- Some properties to specialise the matching or the creation
of PoolResource.user
- is an identifier of the context wanting a resource in the
pool.
PoolException
public int getSize()
getSize
in interface Pool
public int getFreeResourceNumber()
getFreeResourceNumber
in interface Pool
public int getUsedResourceNumber()
getUsedResourceNumber
in interface Pool
public java.util.Collection getUsers()
getUsers
in interface Pool
public void releaseResource(java.lang.Object resource) throws PoolException
Pool
releaseResource
in interface Pool
resource
- The PoolResource to be released.
PoolException
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |