public boolean isDestroyed() { return getDelegate().isDestroyed(); }
public boolean isDestroyed() { return getDelegate().isDestroyed(); }
/** * Releases all system resources and destroys the {@link Pool} when created by this {@link PoolFactoryBean}. * * @throws Exception if the {@link Pool} destruction caused an error. * @see org.springframework.beans.factory.DisposableBean#destroy() */ @Override public void destroy() throws Exception { Optional.ofNullable(this.pool) .filter(pool -> this.springManagedPool) .filter(pool -> !pool.isDestroyed()) .ifPresent(pool -> { pool.releaseThreadLocalConnection(); pool.destroy(this.keepAlive); setPool(null); logDebug("Destroyed Pool [%s]", pool.getName()); }); }
/** * Releases all system resources and destroys the {@link Pool} when created by this {@link PoolFactoryBean}. * * @throws Exception if the {@link Pool} destruction caused an error. * @see org.springframework.beans.factory.DisposableBean#destroy() */ @Override public void destroy() throws Exception { Optional.ofNullable(this.pool) .filter(pool -> this.springManagedPool) .filter(pool -> !pool.isDestroyed()) .ifPresent(pool -> { pool.releaseThreadLocalConnection(); pool.destroy(this.keepAlive); setPool(null); logDebug("Destroyed Pool [%s]", pool.getName()); }); }
}).when(mockPool).destroy(anyBoolean()); when(mockPool.isDestroyed()).thenAnswer(newGetter(destroyed)); when(mockPool.getFreeConnectionTimeout()).thenReturn(freeConnectionTimeout.get()); when(mockPool.getIdleTimeout()).thenReturn(idleTimeout.get());
builder.withDetail(poolKey(poolName, "destroyed"), toYesNoString(pool.isDestroyed())) .withDetail(poolKey(poolName, "free-connection-timeout"), pool.getFreeConnectionTimeout()) .withDetail(poolKey(poolName, "idle-timeout"), pool.getIdleTimeout())