/** * <p>Closes the pool. Once the pool is closed, {@link #borrowObject()} * will fail with IllegalStateException, but {@link #returnObject(Object)} and * {@link #invalidateObject(Object)} will continue to work, with returned objects * destroyed on return.</p> * * <p>Destroys idle instances in the pool by invoking {@link #clear()}.</p> * * @throws Exception */ @Override public void close() throws Exception { super.close(); synchronized (this) { clear(); startEvictor(-1L); while(_allocationQueue.size() > 0) { Latch<T> l = _allocationQueue.removeFirst(); synchronized (l) { // notify the waiting thread l.notify(); } } } }
public void close() { pool.clear(); try { pool.close(); } catch (Exception e) { } }
public void clear() { if (pool != null) { pool.clear(); } }
private void clearAllSockets() { _socketPool.clear(); }
private void clearAllSockets() { _socketPool.clear(); }
private void clearAllSockets() { _socketPool.clear(); }
private void clearAllSockets() { _socketPool.clear(); }
private void clearAllSockets() { _socketPool.clear(); }
public void clear() { if (this.sessionPool != null) { try { this.sessionPool.clear(); } catch (Exception e) { if (log.isDebugEnabled()) { log.warn("Failed to clear session pool.", e); } else if (log.isWarnEnabled()) { log.warn("Failed to clear session pool. {}", e.toString()); } } } }
/** * <p>Closes the pool. Once the pool is closed, {@link #borrowObject()} * will fail with IllegalStateException, but {@link #returnObject(Object)} and * {@link #invalidateObject(Object)} will continue to work, with returned objects * destroyed on return.</p> * * <p>Destroys idle instances in the pool by invoking {@link #clear()}.</p> * * @throws Exception */ @Override public void close() throws Exception { super.close(); synchronized (this) { clear(); startEvictor(-1L); while(_allocationQueue.size() > 0) { Latch<T> l = _allocationQueue.removeFirst(); synchronized (l) { // notify the waiting thread l.notify(); } } } }
/** * <p>Closes the pool. Once the pool is closed, {@link #borrowObject()} * will fail with IllegalStateException, but {@link #returnObject(Object)} and * {@link #invalidateObject(Object)} will continue to work, with returned objects * destroyed on return.</p> * * <p>Destroys idle instances in the pool by invoking {@link #clear()}.</p> * * @throws Exception */ @Override public void close() throws Exception { super.close(); synchronized (this) { clear(); startEvictor(-1L); while(_allocationQueue.size() > 0) { Latch<T> l = _allocationQueue.removeFirst(); synchronized (l) { // notify the waiting thread l.notify(); } } } }
/** * Closes the pool. Once the pool is closed, {@link #borrowObject()} * will fail with IllegalStateException, but {@link #returnObject(Object)} and * {@link #invalidateObject(Object)} will continue to work. This method does not * {@link #clear()} the pool. The method is idempotent - that is, it is OK to call it on a closed * pool. * * @throws Exception */ public void close() throws Exception { super.close(); synchronized (this) { clear(); startEvictor(-1L); } }
/** * Closes the pool. Once the pool is closed, {@link #borrowObject()} * will fail with IllegalStateException, but {@link #returnObject(Object)} and * {@link #invalidateObject(Object)} will continue to work. This method does not * {@link #clear()} the pool. The method is idempotent - that is, it is OK to call it on a closed * pool. * * @throws Exception */ public void close() throws Exception { super.close(); synchronized (this) { clear(); startEvictor(-1L); } }
public void registryDidShutdown() { try { _contextPool.clear(); _contextPool.close(); OgnlRuntime.clearCache(); Introspector.flushCaches(); } catch (Exception et) { // ignore } }
public void registryDidShutdown() { try { _contextPool.clear(); _contextPool.close(); OgnlRuntime.clearCache(); Introspector.flushCaches(); } catch (Exception et) { // ignore } }
public void reloadIndexSettings() throws Exception { indexLock.writeLock().lock(); try { IndexConfig newIndexConfig = loadIndexSettings(mongo, mongoConfig.getDatabaseName(), indexName); IndexSettings indexSettings = newIndexConfig.getIndexSettings(); indexConfig.configure(indexSettings); parsers.clear(); //force analyzer to be fetched first so it doesn't fail only on one segment below getPerFieldAnalyzer(); for (LumongoSegment s : segmentMap.values()) { try { s.updateIndexSettings(indexSettings); } catch (Exception ignored) { } } } finally { indexLock.writeLock().unlock(); } }