use of org.apache.ignite.client.ClientRetryPolicy in project ignite by apache.
the class ReliableChannel method shouldRetry.
/**
* Determines whether specified operation should be retried.
*/
private boolean shouldRetry(ClientOperation op, int iteration, ClientConnectionException exception) {
ClientOperationType opType = op.toPublicOperationType();
if (opType == null)
// System operation.
return true;
ClientRetryPolicy plc = clientCfg.getRetryPolicy();
if (plc == null)
return false;
ClientRetryPolicyContext ctx = new ClientRetryPolicyContextImpl(clientCfg, opType, iteration, exception);
return plc.shouldRetry(ctx);
}
Aggregations