List of usage examples for org.apache.thrift.async TAsyncClient hasError
public boolean hasError()
From source file:com.nearinfinity.blur.thrift.AsyncClientPool.java
License:Apache License
private void returnClient(Connection connection, TAsyncClient client) throws InterruptedException { if (!client.hasError()) { getQueue(connection).put(client); } else {/*ww w. j a v a 2 s . co m*/ AtomicInteger counter = _numberOfConnections.get(connection.getHost()); if (counter != null) { counter.decrementAndGet(); } } }
From source file:org.corfudb.runtime.protocols.AsyncPooledThriftClient.java
License:Apache License
private void returnClient(TAsyncClient client) throws InterruptedException { if (!client.hasError()) { getQueue(_connection).put(client); } else {/* w w w. j av a 2s. c om*/ AtomicInteger counter = _numberOfConnections.get(_connection.getHost()); if (counter != null) { counter.decrementAndGet(); } } }