org.apache.geronimo.connector.outbound
Class AbstractSinglePoolConnectionInterceptor
java.lang.Object
org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor
- All Implemented Interfaces:
- ConnectionInterceptor, PoolingAttributes
- Direct Known Subclasses:
- SinglePoolConnectionInterceptor, SinglePoolMatchAllConnectionInterceptor
public abstract class AbstractSinglePoolConnectionInterceptor
- extends Object
- implements ConnectionInterceptor, PoolingAttributes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Log log
next
protected final ConnectionInterceptor next
permits
protected Semaphore permits
blockingTimeoutMilliseconds
protected int blockingTimeoutMilliseconds
connectionCount
protected int connectionCount
timer
protected Timer timer
maxSize
protected int maxSize
minSize
protected int minSize
shrinkLater
protected int shrinkLater
destroyed
protected volatile boolean destroyed
AbstractSinglePoolConnectionInterceptor
public AbstractSinglePoolConnectionInterceptor(ConnectionInterceptor next,
int maxSize,
int minSize,
int blockingTimeoutMilliseconds,
int idleTimeoutMinutes)
getConnection
public void getConnection(ConnectionInfo connectionInfo)
throws ResourceException
- Specified by:
getConnection
in interface ConnectionInterceptor
- Throws:
ResourceException
internalGetConnection
protected abstract void internalGetConnection(ConnectionInfo connectionInfo)
throws ResourceException
- Throws:
ResourceException
returnConnection
public void returnConnection(ConnectionInfo connectionInfo,
ConnectionReturnAction connectionReturnAction)
- Specified by:
returnConnection
in interface ConnectionInterceptor
internalReturn
protected boolean internalReturn(ConnectionInfo connectionInfo,
ConnectionReturnAction connectionReturnAction)
internalDestroy
protected abstract void internalDestroy()
destroy
public void destroy()
- Specified by:
destroy
in interface ConnectionInterceptor
getPartitionCount
public int getPartitionCount()
- Specified by:
getPartitionCount
in interface PoolingAttributes
getPartitionMaxSize
public int getPartitionMaxSize()
- Specified by:
getPartitionMaxSize
in interface PoolingAttributes
setPartitionMaxSize
public void setPartitionMaxSize(int newMaxSize)
throws InterruptedException
- Specified by:
setPartitionMaxSize
in interface PoolingAttributes
- Throws:
InterruptedException
doRemove
protected abstract boolean doRemove(ManagedConnectionInfo mci)
doAdd
protected abstract void doAdd(ManagedConnectionInfo mci)
getPool
protected abstract Object getPool()
transferConnections
protected abstract void transferConnections(int maxSize,
int shrinkNow)
getIdleConnectionCount
public abstract int getIdleConnectionCount()
- Specified by:
getIdleConnectionCount
in interface PoolingAttributes
getConnectionCount
public int getConnectionCount()
- Specified by:
getConnectionCount
in interface PoolingAttributes
getPartitionMinSize
public int getPartitionMinSize()
- Specified by:
getPartitionMinSize
in interface PoolingAttributes
setPartitionMinSize
public void setPartitionMinSize(int minSize)
- Specified by:
setPartitionMinSize
in interface PoolingAttributes
getBlockingTimeoutMilliseconds
public int getBlockingTimeoutMilliseconds()
- Specified by:
getBlockingTimeoutMilliseconds
in interface PoolingAttributes
setBlockingTimeoutMilliseconds
public void setBlockingTimeoutMilliseconds(int blockingTimeoutMilliseconds)
- Specified by:
setBlockingTimeoutMilliseconds
in interface PoolingAttributes
getIdleTimeoutMinutes
public int getIdleTimeoutMinutes()
- Specified by:
getIdleTimeoutMinutes
in interface PoolingAttributes
setIdleTimeoutMinutes
public void setIdleTimeoutMinutes(int idleTimeoutMinutes)
- Specified by:
setIdleTimeoutMinutes
in interface PoolingAttributes
getExpiredManagedConnectionInfos
protected abstract void getExpiredManagedConnectionInfos(long threshold,
List<ManagedConnectionInfo> killList)
addToPool
protected boolean addToPool(ManagedConnectionInfo mci)
Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.