org.apache.geronimo.connector.outbound
Class SinglePoolMatchAllConnectionInterceptor

java.lang.Object
  extended byorg.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor
      extended byorg.apache.geronimo.connector.outbound.SinglePoolMatchAllConnectionInterceptor
All Implemented Interfaces:
ConnectionInterceptor, PoolingAttributes

public class SinglePoolMatchAllConnectionInterceptor
extends AbstractSinglePoolConnectionInterceptor

This pool is the most spec-compliant pool. It can be used by itself with no partitioning. It is apt to be the slowest pool. For each connection request, it synchronizes access to the pool and asks the ManagedConnectionFactory for a match from among all managed connections. If none is found, it may discard a random existing connection, and creates a new connection.

Version:
$Rev: 355877 $ $Date: 2005-12-11 03:48:27 +0100 (Sun, 11 Dec 2005) $

Nested Class Summary
 
Nested classes inherited from class org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor
AbstractSinglePoolConnectionInterceptor.FillTask
 
Field Summary
 
Fields inherited from class org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor
blockingTimeoutMilliseconds, connectionCount, destroyed, log, minSize, next, permits, shrinkLater, timer
 
Constructor Summary
SinglePoolMatchAllConnectionInterceptor(ConnectionInterceptor next, int maxSize, int minSize, int blockingTimeoutMilliseconds, int idleTimeoutMinutes)
           
 
Method Summary
protected  boolean addToPool(ManagedConnectionInfo mci)
           
protected  void getExpiredManagedConnectionInfos(long threshold, ArrayList killList)
           
 int getIdleConnectionCount()
           
 int getPartitionMaxSize()
           
protected  void internalDestroy()
           
protected  void internalGetConnection(ConnectionInfo connectionInfo)
           
protected  boolean internalReturn(ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
           
protected  void transferConnections(int maxSize, int shrinkNow)
           
 
Methods inherited from class org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor
destroy, getBlockingTimeoutMilliseconds, getConnection, getConnectionCount, getIdleTimeoutMinutes, getPartitionCount, getPartitionMinSize, returnConnection, setBlockingTimeoutMilliseconds, setIdleTimeoutMinutes, setPartitionMaxSize, setPartitionMinSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SinglePoolMatchAllConnectionInterceptor

public SinglePoolMatchAllConnectionInterceptor(ConnectionInterceptor next,
                                               int maxSize,
                                               int minSize,
                                               int blockingTimeoutMilliseconds,
                                               int idleTimeoutMinutes)
Method Detail

internalGetConnection

protected void internalGetConnection(ConnectionInfo connectionInfo)
                              throws javax.resource.ResourceException
Specified by:
internalGetConnection in class AbstractSinglePoolConnectionInterceptor
Throws:
javax.resource.ResourceException

internalReturn

protected boolean internalReturn(ConnectionInfo connectionInfo,
                                 ConnectionReturnAction connectionReturnAction)
Specified by:
internalReturn in class AbstractSinglePoolConnectionInterceptor

internalDestroy

protected void internalDestroy()
Specified by:
internalDestroy in class AbstractSinglePoolConnectionInterceptor

getPartitionMaxSize

public int getPartitionMaxSize()
Specified by:
getPartitionMaxSize in interface PoolingAttributes
Specified by:
getPartitionMaxSize in class AbstractSinglePoolConnectionInterceptor

getIdleConnectionCount

public int getIdleConnectionCount()
Specified by:
getIdleConnectionCount in interface PoolingAttributes
Specified by:
getIdleConnectionCount in class AbstractSinglePoolConnectionInterceptor

transferConnections

protected void transferConnections(int maxSize,
                                   int shrinkNow)
Specified by:
transferConnections in class AbstractSinglePoolConnectionInterceptor

getExpiredManagedConnectionInfos

protected void getExpiredManagedConnectionInfos(long threshold,
                                                ArrayList killList)
Specified by:
getExpiredManagedConnectionInfos in class AbstractSinglePoolConnectionInterceptor

addToPool

protected boolean addToPool(ManagedConnectionInfo mci)
Specified by:
addToPool in class AbstractSinglePoolConnectionInterceptor


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.