public void shutdown ( ) { // as resources are returned we need to shut them down T t ; synchronized ( lock ) { isRunning = false ; t = idleResources . poll ( ) ; } while ( t != null ) { returnResource ( t , true ) ; synchronized ( lock ) { t = idleResources . poll ( ) ; } } }
Shutdown the resource manager where all returned resources are closed and not put back into the idle queue of resources . It is important to note that even after shutdown is initiated if getresource is invoked it will return a resource .