org.apache.axis.transport.jms
Class JMSConnectorManager.ShareableObjectPool
public
class
JMSConnectorManager.ShareableObjectPool
extends Object
A simple non-blocking pool impl for objects that can be shared.
Only a ref count is necessary to prevent collisions at shutdown.
Todo: max size, cleanup stale connections
Method Summary |
void | addObject(Object obj)
Adds the object to the pool, if not already added |
Set | getElements() |
void | release(Object obj)
Decrements the connector's reference count |
void | removeObject(Object obj, long waitTime)
Removes the object from the pool. |
void | removeObject(Object obj) |
void | reserve(Object obj)
Marks the connector as in use by incrementing the connector's reference count |
int | size() |
public ShareableObjectPool()
public void addObject(Object obj)
Adds the object to the pool, if not already added
public Set getElements()
public void release(Object obj)
Decrements the connector's reference count
public void removeObject(Object obj, long waitTime)
Removes the object from the pool. If the object is reserved,
waits the specified time before forcibly removing
Todo: check expirations with the next request instead of holding up the current request
public void removeObject(Object obj)
public void reserve(Object obj)
Marks the connector as in use by incrementing the connector's reference count
public int size()
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.