Search in sources :

Example 1 with ClientOperationType

use of org.apache.ignite.client.ClientOperationType 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);
}
Also used : ClientOperationType(org.apache.ignite.client.ClientOperationType) ClientRetryPolicy(org.apache.ignite.client.ClientRetryPolicy) ClientRetryPolicyContext(org.apache.ignite.client.ClientRetryPolicyContext)

Aggregations

ClientOperationType (org.apache.ignite.client.ClientOperationType)1 ClientRetryPolicy (org.apache.ignite.client.ClientRetryPolicy)1 ClientRetryPolicyContext (org.apache.ignite.client.ClientRetryPolicyContext)1