use of com.navercorp.pinpoint.rpc.PinpointSocketException in project pinpoint by naver.
the class DefaultPinpointClient method returnFailureFuture.
private Future<ResponseMessage> returnFailureFuture() {
DefaultFuture<ResponseMessage> future = new DefaultFuture<ResponseMessage>();
future.setFailure(new PinpointSocketException("pinpointClientHandler is null"));
return future;
}
use of com.navercorp.pinpoint.rpc.PinpointSocketException in project pinpoint by naver.
the class RequestManager method close.
public void close() {
logger.debug("close()");
final PinpointSocketException closed = new PinpointSocketException("socket closed");
// Could you handle race conditions of "close" more precisely?
// final Timer timer = this.timer;
// if (timer != null) {
// Set<Timeout> stop = timer.stop();
// for (Timeout timeout : stop) {
// DefaultFuture future = (DefaultFuture)timeout.getTask();
// future.setFailure(closed);
// }
// }
int requestFailCount = 0;
for (Map.Entry<Integer, DefaultFuture<ResponseMessage>> entry : requestMap.entrySet()) {
if (entry.getValue().setFailure(closed)) {
requestFailCount++;
}
}
this.requestMap.clear();
if (requestFailCount > 0) {
logger.info("requestManager failCount:{}", requestFailCount);
}
}
Aggregations