/** * {@inheritDoc} * <p>Activation of this method decrements the active count associated with the given keyed pool * and attempts to destroy <code>obj.</code></p> * * @param key pool key * @param obj instance to invalidate * @throws Exception if an exception occurs destroying the object */ @Override public void invalidateObject(K key, V obj) throws Exception { try { _factory.destroyObject(key, obj); } finally { synchronized (this) { ObjectQueue pool = (_poolMap.get(key)); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); _poolList.add(key); } pool.decrementActiveCount(); } allocate(); // _totalActive has changed } }
if (pool != null) { synchronized(this) { pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 &&
pool.decrementActiveCount(); pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 &&
pool.decrementActiveCount(); pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 &&
pool.decrementActiveCount(); pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 &&
pool.decrementActiveCount(); pool.decrementActiveCount(); allocate();
pool.decrementActiveCount(); pool.decrementActiveCount(); allocate();
if (pool != null) { synchronized(this) { pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 &&
if (pool != null) { synchronized(this) { pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 &&
if (pool != null) { synchronized(this) { pool.decrementActiveCount(); allocate();
if (pool != null) { synchronized(this) { pool.decrementActiveCount(); allocate();
/** * {@inheritDoc} * <p>Activation of this method decrements the active count associated with the given keyed pool * and attempts to destroy <code>obj.</code></p> * * @param key pool key * @param obj instance to invalidate * @throws Exception if an exception occurs destroying the object */ @Override public void invalidateObject(K key, V obj) throws Exception { try { _factory.destroyObject(key, obj); } finally { synchronized (this) { ObjectQueue pool = (_poolMap.get(key)); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); _poolList.add(key); } pool.decrementActiveCount(); } allocate(); // _totalActive has changed } }
/** * <p>Invalidates the object instance associated with the given key. Decrements the active count * associated with the given keyed pool and destroys the instance.</p> * * @param key pool key * @param obj instance to invalidate * @throws Exception if an exception occurs destroying the object */ public void invalidateObject(Object key, Object obj) throws Exception { try { _factory.destroyObject(key, obj); } finally { synchronized (this) { ObjectQueue pool = (ObjectQueue) (_poolMap.get(key)); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); _poolList.add(key); } pool.decrementActiveCount(); allocate(); // _totalActive has changed } } }
/** * {@inheritDoc} * <p>Activation of this method decrements the active count associated with the given keyed pool * and attempts to destroy <code>obj.</code></p> * * @param key pool key * @param obj instance to invalidate * @throws Exception if an exception occurs destroying the object */ @Override public void invalidateObject(K key, V obj) throws Exception { try { _factory.destroyObject(key, obj); } finally { synchronized (this) { ObjectQueue pool = (_poolMap.get(key)); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); _poolList.add(key); } pool.decrementActiveCount(); } allocate(); // _totalActive has changed } }
/** * <p>Invalidates the object instance associated with the given key. Decrements the active count * associated with the given keyed pool and destroys the instance.</p> * * @param key pool key * @param obj instance to invalidate * @throws Exception if an exception occurs destroying the object */ public void invalidateObject(Object key, Object obj) throws Exception { try { _factory.destroyObject(key, obj); } finally { synchronized (this) { ObjectQueue pool = (ObjectQueue) (_poolMap.get(key)); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key, pool); _poolList.add(key); } pool.decrementActiveCount(); allocate(); // _totalActive has changed } } }