com.bazaarvoice.ostrich.RetryPolicy Maven / Gradle / Ivy
package com.bazaarvoice.ostrich;
/** Abstracts the strategy of determining when to retry operations. */
public interface RetryPolicy {
/**
* Called when an operation has failed for some reason. If this method returns true
* then the operation will be retried.
*
* @param numAttempts The number of attempts that have happened so far. This must be greater than zero.
* @param elapsedTimeMs The amount of time in milliseconds that the operation has been attempted.
* @return true
if the operation can be tried again, false
otherwise.
*/
boolean allowRetry(int numAttempts, long elapsedTimeMs);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy