private boolean needToReclaimConnections ( ) { boolean removemcw = false ; for ( int j = 0 ; j < maxFreePoolHashSize ; ++ j ) { synchronized ( freePool [ j ] . freeConnectionLockObject ) { int localtotalConnectionCount = totalConnectionCount . get ( ) ; int mcwlSize = freePool [ j ] . mcWrapperList . size ( ) ; for ( int k = 0 ; k < mcwlSize ; ++ k ) { MCWrapper mcw = ( MCWrapper ) freePool [ j ] . mcWrapperList . get ( k ) ; if ( agedTimeout != - 1 ) { if ( mcw . hasAgedTimedOut ( agedTimeoutMillis ) ) { removemcw = true ; break ; } } if ( ! removemcw && unusedTimeout != - 1 ) { if ( mcw . hasIdleTimedOut ( unusedTimeout * 1000 ) && ( localtotalConnectionCount > minConnections ) ) { removemcw = true ; break ; } } } } if ( removemcw ) { break ; } } return removemcw ; }
Do we need to reclaim connections .