in curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java [755:789]
private <DATA_TYPE> void handleBackgroundOperationException(
OperationAndData<DATA_TYPE> operationAndData, Throwable e) {
do {
if ((operationAndData != null)
&& getZookeeperClient().getRetryPolicy().allowRetry(e)) {
if (!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES)) {
log.debug("Retry-able exception received", e);
}
if (client.getRetryPolicy()
.allowRetry(
operationAndData.getThenIncrementRetryCount(),
operationAndData.getElapsedTimeMs(),
operationAndData)) {
if (!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES)) {
log.debug("Retrying operation");
}
queueOperation(operationAndData);
break;
} else {
if (!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES)) {
log.debug("Retry policy did not allow retry");
}
if (operationAndData.getErrorCallback() != null) {
operationAndData.getErrorCallback().retriesExhausted(operationAndData);
}
}
}
if (operationAndData != null) {
abortOperation(operationAndData, e);
}
logError("Background exception was not retry-able or retry gave up", e);
} while (false);
}