}
boolean shouldDestroy = false;
synchronized(this) {
// grab the pool (list) of objects associated with the given key
CursorableLinkedList pool = (CursorableLinkedList) (_poolMap.get(key));
// if it doesn't exist, create it
if(null == pool) {
pool = new CursorableLinkedList();
_poolMap.put(key, pool);
_poolList.add(key);
}
decrementActiveCount(key);
// if there's no space in the pool, flag the object for destruction
// else if we passivated succesfully, return it to the pool
if(_maxIdle >= 0 && (pool.size() >= _maxIdle)) {
shouldDestroy = true;
} else if(success) {
pool.addFirst(new ObjectTimestampPair(obj));
_totalIdle++;
}
notifyAll();
}