Interface Retryable

All Superinterfaces:
org.refcodes.mixin.Abortable, org.refcodes.mixin.Restartable
All Known Implementing Classes:
RetryCounter, RetryTimeout

public interface Retryable extends org.refcodes.mixin.Restartable, org.refcodes.mixin.Abortable
The Retryable provides methods for performing various retry iterations, be it based on retry counts or retry timeouts.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The current state regarding the retires.
    boolean
    Returns true in case not all retires have been used up.
    boolean
    Tests whether a next retry is possible.

    Methods inherited from interface org.refcodes.mixin.Abortable

    abort

    Methods inherited from interface org.refcodes.mixin.Restartable

    restart
  • Method Details

    • nextRetry

      boolean nextRetry()
      Tests whether a next retry is possible. In case this is the case, then the thread is delayed by the configured (implementation specific) delay time.
      Returns:
      True in case there is a next retry as of hasNextRetry().
    • hasNextRetry

      boolean hasNextRetry()
      Returns true in case not all retires have been used up.
      Returns:
      True in case there are retries left true in case all retries elapsed.
    • getRetryCount

      int getRetryCount()
      The current state regarding the retires. It specifies at which retry we currently are.
      Returns:
      The number of retries used up so far.