io.netty.channel.pool.ChannelHealthChecker Java Examples

The following examples show how to use io.netty.channel.pool.ChannelHealthChecker. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RntbdRequestManager.java    From azure-cosmosdb-java with MIT License 5 votes vote down vote up
public RntbdRequestManager(final ChannelHealthChecker healthChecker, final int pendingRequestLimit) {

        checkArgument(pendingRequestLimit > 0, "pendingRequestLimit: %s", pendingRequestLimit);
        checkNotNull(healthChecker, "healthChecker");

        this.pendingRequests = new ConcurrentHashMap<>(pendingRequestLimit);
        this.pendingRequestLimit = pendingRequestLimit;
        this.healthChecker = healthChecker;
    }
 
Example #2
Source File: StreamingAsyncHttpClient.java    From riposte with Apache License 2.0 5 votes vote down vote up
@Override
public Future<Boolean> isHealthy(Channel channel) {
    // See if we've marked the channel as being non-usable first.
    if (channelIsMarkedAsBeingBroken(channel))
        return channel.eventLoop().newSucceededFuture(Boolean.FALSE);

    // We haven't marked it broken, so fallback to the default channel health checker.
    return ChannelHealthChecker.ACTIVE.isHealthy(channel);
}
 
Example #3
Source File: RntbdClientChannelHandler.java    From azure-cosmosdb-java with MIT License 4 votes vote down vote up
RntbdClientChannelHandler(final Config config, final ChannelHealthChecker healthChecker) {
    checkNotNull(healthChecker, "expected non-null healthChecker");
    checkNotNull(config, "expected non-null config");
    this.healthChecker = healthChecker;
    this.config = config;
}
 
Example #4
Source File: ConnectionlessChannelPool.java    From async-gamequery-lib with MIT License 4 votes vote down vote up
public ConnectionlessChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, ChannelHealthChecker healthCheck) {
    super(bootstrap, handler, healthCheck);
}
 
Example #5
Source File: ConnectionlessChannelPool.java    From async-gamequery-lib with MIT License 4 votes vote down vote up
public ConnectionlessChannelPool(Bootstrap bootstrap, ChannelPoolHandler handler, ChannelHealthChecker healthCheck, boolean releaseHealthCheck) {
    super(bootstrap, handler, healthCheck, releaseHealthCheck);
}