Class DefaultRetry<T>

java.lang.Object
com.couchbase.client.core.retry.reactor.AbstractRetry<T,Throwable>
com.couchbase.client.core.retry.reactor.DefaultRetry<T>
All Implemented Interfaces:
Retry<T>, Function<Flux<Throwable>,org.reactivestreams.Publisher<Long>>

@Deprecated public class DefaultRetry<T> extends AbstractRetry<T,Throwable> implements Retry<T>
Deprecated.
Use equivalent features of reactor-core like RetrySpec and RetryBackoffSpec instead.
  • Method Details

    • create

      public static <T> DefaultRetry<T> create(Predicate<? super RetryContext<T>> retryPredicate)
      Deprecated.
    • withApplicationContext

      public Retry<T> withApplicationContext(T applicationContext)
      Deprecated.
      Description copied from interface: Retry
      Returns a retry function with an application context that may be used to perform any rollbacks before a retry. This application context is provided to any retry predicate Retry.onlyIf(Predicate), custom backoff function Retry.backoff(Backoff) and retry callback Retry.doOnRetry(Consumer). All other properties of this retry function are retained in the returned instance.
      Specified by:
      withApplicationContext in interface Retry<T>
      Parameters:
      applicationContext - Application context
      Returns:
      retry function with associated application context
    • doOnRetry

      public Retry<T> doOnRetry(Consumer<? super RetryContext<T>> onRetry)
      Deprecated.
      Description copied from interface: Retry
      Returns a retry function that invokes the provided onRetry callback before every retry. The RetryContext provided to the callback contains the iteration and the any application context set using Retry.withApplicationContext(Object). All other properties of this retry function are retained in the returned instance.
      Specified by:
      doOnRetry in interface Retry<T>
      Parameters:
      onRetry - callback to invoke before retries
      Returns:
      retry function with callback
    • retryMax

      public Retry<T> retryMax(long maxIterations)
      Deprecated.
      Description copied from interface: Retry
      Retry function that retries n times.
      Specified by:
      retryMax in interface Retry<T>
      Parameters:
      maxIterations - number of retries
      Returns:
      Retry function for n retries
    • timeout

      public Retry<T> timeout(Duration timeout)
      Deprecated.
      Description copied from interface: Retry
      Returns a retry function with timeout. The timeout starts from the instant that this function is applied, and the function keeps retrying until the timeout expires (or until the configured maximum number of attempts, if it has been set). All other properties of this retry function are retained in the returned instance.
      Specified by:
      timeout in interface Retry<T>
      Parameters:
      timeout - timeout after which no new retries are initiated
      Returns:
      retry function with global timeout
    • backoff

      public Retry<T> backoff(Backoff backoff)
      Deprecated.
      Description copied from interface: Retry
      Returns a retry function with backoff delay. All other properties of this retry function are retained in the returned instance.
      Specified by:
      backoff in interface Retry<T>
      Parameters:
      backoff - the backoff function to determine backoff delay
      Returns:
      retry function with backoff
    • jitter

      public Retry<T> jitter(Jitter jitter)
      Deprecated.
      Description copied from interface: Retry
      Returns a retry function that applies jitter to the backoff delay. All other properties of this retry function are retained in the returned instance.
      Specified by:
      jitter in interface Retry<T>
      Parameters:
      jitter - Jitter function to randomize backoff delay
      Returns:
      retry function with jitter for backoff
    • withBackoffScheduler

      public Retry<T> withBackoffScheduler(Scheduler scheduler)
      Deprecated.
      Description copied from interface: Retry
      Returns a retry function that uses the scheduler provided for backoff delays. All other properties of this retry function are retained in the returned instance.
      Specified by:
      withBackoffScheduler in interface Retry<T>
      Parameters:
      scheduler - the scheduler for backoff delays
      Returns:
      retry function with backoff scheduler
    • apply

      public org.reactivestreams.Publisher<Long> apply(Flux<Throwable> errors)
      Deprecated.
      Specified by:
      apply in interface Function<Flux<Throwable>,org.reactivestreams.Publisher<Long>>
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object