use of io.lettuce.core.cluster.StatefulRedisClusterConnectionImpl in project pinpoint by naver.
the class AttachEndPointInterceptor method after.
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
if (isDebug) {
logger.afterInterceptor(target, args, result, throwable);
}
try {
if (!validate(target, result)) {
return;
}
final String endPoint = ((EndPointAccessor) target)._$PINPOINT$_getEndPoint();
if (result instanceof CompletableFuture) {
StatefulRedisClusterConnectionImpl statefulRedisClusterConnection = (StatefulRedisClusterConnectionImpl) ((CompletableFuture) result).get();
((EndPointAccessor) statefulRedisClusterConnection)._$PINPOINT$_setEndPoint(endPoint);
return;
}
((EndPointAccessor) result)._$PINPOINT$_setEndPoint(endPoint);
} catch (Throwable t) {
if (logger.isWarnEnabled()) {
logger.warn("Failed to AFTER process. {}", t.getMessage(), t);
}
}
}
Aggregations