com.nurkiewicz.asyncretry.RetryContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asyncretry Show documentation
Show all versions of asyncretry Show documentation
Library that asynchronously retries failed invocations of arbitrary code
The newest version!
package com.nurkiewicz.asyncretry;
/**
* @author Tomasz Nurkiewicz
* @since 7/16/13, 6:36 PM
*/
public interface RetryContext {
boolean willRetry();
/**
* Which retry is being executed right now
* @return 1 means it's the first retry, i.e. action is executed for the second time
*/
int getRetryCount();
Throwable getLastThrowable();
default boolean isFirstRetry() {
return getRetryCount() == 1;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy