Class FailFastRetryStrategy

java.lang.Object
com.couchbase.client.core.retry.FailFastRetryStrategy
All Implemented Interfaces:
RetryStrategy

public class FailFastRetryStrategy
extends Object
implements RetryStrategy
A RetryStrategy that will never retry and cancel right away.
Since:
1.1.0
Author:
Michael Nitschinger
  • Field Details

  • Method Details

    • shouldRetry

      public boolean shouldRetry​(CouchbaseRequest request, CoreEnvironment env)
      Description copied from interface: RetryStrategy
      Decides whether the given CouchbaseRequest should be retried or cancelled.
      Specified by:
      shouldRetry in interface RetryStrategy
      Parameters:
      request - the request in question.
      env - the environment for more context.
      Returns:
      true if it should be retried, false otherwise.
    • shouldRetryObserve

      public boolean shouldRetryObserve()
      Description copied from interface: RetryStrategy
      Decides whether ObserveRequests should be retried or cancelled when an error happens. When false is returned, as soon as an error happens (for example one of the nodes that need to be reached does not have an active partition because of a node failure) the whole observe sequence is aborted. If retried, errors are swallowed and the observe cycle will start again.
      Specified by:
      shouldRetryObserve in interface RetryStrategy
      Returns:
      true if it should be retried, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object