private void addLeased(final PoolEntry<T, C> entry) { if (leased.putIfAbsent(entry, Boolean.TRUE) != null) { throw new IllegalStateException("Pool entry already present in the set of leased entries"); } else if (connPoolListener != null) { connPoolListener.onLease(route, connPoolStats); } }
private void removeLeased(final PoolEntry<T, C> entry) { if (connPoolListener != null) { connPoolListener.onRelease(route, connPoolStats); } if (!leased.remove(entry, Boolean.TRUE)) { throw new IllegalStateException("Pool entry is not present in the set of leased entries"); } }
private void addLeased(final PoolEntry<T, C> entry) { if (leased.putIfAbsent(entry, Boolean.TRUE) != null) { throw new IllegalStateException("Pool entry already present in the set of leased entries"); } else if (connPoolListener != null) { connPoolListener.onLease(route, connPoolStats); } }
private void removeLeased(final PoolEntry<T, C> entry) { if (connPoolListener != null) { connPoolListener.onRelease(route, connPoolStats); } if (!leased.remove(entry, Boolean.TRUE)) { throw new IllegalStateException("Pool entry is not present in the set of leased entries"); } }
@Override public void release(final PoolEntry<T, C> entry, final boolean reusable) { if (entry == null) { return; } if (isShutDown.get()) { return; } final PerRoutePool<T, C> routePool = getPool(entry.getRoute()); if (connPoolListener != null) { connPoolListener.onLease(entry.getRoute(), this); } routePool.release(entry, reusable); }
if (this.leased.remove(entry)) { if (this.connPoolListener != null) { this.connPoolListener.onRelease(entry.getRoute(), this);
@Override public void release(final PoolEntry<T, C> entry, final boolean reusable) { if (entry == null) { return; } if (isShutDown.get()) { return; } final PerRoutePool<T, C> routePool = getPool(entry.getRoute()); if (connPoolListener != null) { connPoolListener.onLease(entry.getRoute(), this); } routePool.release(entry, reusable); }
if (this.leased.remove(entry)) { if (this.connPoolListener != null) { this.connPoolListener.onRelease(entry.getRoute(), this);