Skip to content

Commit

Permalink
Allow subclass access to properties (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinbunney authored Oct 6, 2023
1 parent f660cd8 commit 5222417
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,36 @@
public class PerServerConnectionPool implements IConnectionPool {
private static final Logger LOG = LoggerFactory.getLogger(PerServerConnectionPool.class);
public static final AttributeKey<IConnectionPool> CHANNEL_ATTR = AttributeKey.newInstance("_connection_pool");
private final ConcurrentHashMap<EventLoop, Deque<PooledConnection>> connectionsPerEventLoop =
protected final ConcurrentHashMap<EventLoop, Deque<PooledConnection>> connectionsPerEventLoop =
new ConcurrentHashMap<>();
protected final PooledConnectionFactory pooledConnectionFactory;

private final DiscoveryResult server;
private final SocketAddress serverAddr;
private final NettyClientConnectionFactory connectionFactory;
private final ConnectionPoolConfig config;
private final IClientConfig niwsClientConfig;

private final Counter createNewConnCounter;
private final Counter createConnSucceededCounter;
private final Counter createConnFailedCounter;

private final Counter requestConnCounter;
private final Counter reuseConnCounter;
private final Counter connTakenFromPoolIsNotOpen;
private final Counter maxConnsPerHostExceededCounter;
private final Counter closeAboveHighWaterMarkCounter;
private final Timer connEstablishTimer;
private final AtomicInteger connsInPool;
private final AtomicInteger connsInUse;
protected final DiscoveryResult server;
protected final SocketAddress serverAddr;
protected final NettyClientConnectionFactory connectionFactory;
protected final ConnectionPoolConfig config;
protected final IClientConfig niwsClientConfig;

protected final Counter createNewConnCounter;
protected final Counter createConnSucceededCounter;
protected final Counter createConnFailedCounter;

protected final Counter requestConnCounter;
protected final Counter reuseConnCounter;
protected final Counter connTakenFromPoolIsNotOpen;
protected final Counter maxConnsPerHostExceededCounter;
protected final Counter closeAboveHighWaterMarkCounter;
protected final Timer connEstablishTimer;
protected final AtomicInteger connsInPool;
protected final AtomicInteger connsInUse;

/**
* This is the count of connections currently in progress of being established.
* They will only be added to connsInUse _after_ establishment has completed.
*/
private final AtomicInteger connCreationsInProgress;
protected final AtomicInteger connCreationsInProgress;

private volatile boolean draining;
protected volatile boolean draining;

public PerServerConnectionPool(
DiscoveryResult server,
Expand Down

0 comments on commit 5222417

Please sign in to comment.