public class SharedSingletonObjectPool<T> extends Object implements org.apache.commons.pool.ObjectPool<T>
ObjectPool that uses a single shared instance.
 
 This implementation will always return 1 in getNumActive() and
 return 0 in getNumIdle().| Constructor and Description | 
|---|
SharedSingletonObjectPool(org.apache.commons.pool.PoolableObjectFactory<T> factory)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addObject()  | 
T | 
borrowObject()  | 
void | 
clear()  | 
void | 
close()  | 
int | 
getNumActive()  | 
int | 
getNumIdle()  | 
void | 
invalidateObject(T obj)  | 
void | 
returnObject(T obj)  | 
void | 
setFactory(org.apache.commons.pool.PoolableObjectFactory<T> factory)  | 
public SharedSingletonObjectPool(org.apache.commons.pool.PoolableObjectFactory<T> factory)
public T borrowObject() throws Exception, NoSuchElementException, IllegalStateException
borrowObject in interface org.apache.commons.pool.ObjectPool<T>ExceptionNoSuchElementExceptionIllegalStateExceptionpublic void addObject()
               throws Exception,
                      IllegalStateException,
                      UnsupportedOperationException
addObject in interface org.apache.commons.pool.ObjectPool<T>ExceptionIllegalStateExceptionUnsupportedOperationExceptionpublic int getNumIdle()
               throws UnsupportedOperationException
getNumIdle in interface org.apache.commons.pool.ObjectPool<T>UnsupportedOperationExceptionpublic int getNumActive()
                 throws UnsupportedOperationException
getNumActive in interface org.apache.commons.pool.ObjectPool<T>UnsupportedOperationExceptionpublic void clear()
           throws Exception,
                  UnsupportedOperationException
clear in interface org.apache.commons.pool.ObjectPool<T>ExceptionUnsupportedOperationExceptionpublic void close()
           throws Exception
public void setFactory(org.apache.commons.pool.PoolableObjectFactory<T> factory) throws IllegalStateException, UnsupportedOperationException
setFactory in interface org.apache.commons.pool.ObjectPool<T>IllegalStateExceptionUnsupportedOperationExceptionApache Camel