All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.crabshue.commons.retryable.RetryOptions Maven / Gradle / Ivy

package com.crabshue.commons.retryable;

/**
 * Retry options for JAX-RS client operations.
 * 

Default options are:

*
    *
  • maximum number of retries : 0
  • *
  • sleep between retries : 1s
  • *
* */ public class RetryOptions { public static RetryOptions defaultRetryOptions() { return new RetryOptions(); } private int maximumNumberOfRetries = 0; private int sleepBetweenRetriesInMilliseconds = 1000; public int getMaximumNumberOfRetries() { return maximumNumberOfRetries; } public RetryOptions maximumNumberOfRetries(final int maximumNumberOfRetries) { this.maximumNumberOfRetries = maximumNumberOfRetries; return this; } public int getSleepBetweenRetriesInMilliseconds() { return sleepBetweenRetriesInMilliseconds; } public RetryOptions sleepBetweenRetriesInMilliseconds(final int sleepBetweenRetriesInMilliseconds) { this.sleepBetweenRetriesInMilliseconds = sleepBetweenRetriesInMilliseconds; return this; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy