Interface RetryPolicy

All Known Implementing Classes:
RetryLimitPolicy, RetryReadPolicy

public interface RetryPolicy
Client retry policy determines whether client operations that have failed due to a connection issue should be retried.

Predefined policies: RetryLimitPolicy, RetryReadPolicy.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets a value indicating whether a client operation that has failed due to a connection issue should be retried.
  • Method Details

    • shouldRetry

      boolean shouldRetry(RetryPolicyContext context)
      Gets a value indicating whether a client operation that has failed due to a connection issue should be retried.

      If an implementation of this method throws an exception, the operation will be failed with that exception. No more retries will be attempted.

      Parameters:
      context - Context.
      Returns:
      true if the operation should be retried on another connection, false otherwise.