![JAR search and dependency download from the Maven repository](/logo.png)
com.github.rbuck.retry.RetryEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-retry Show documentation
Show all versions of java-retry Show documentation
Lets developers make their applications more resilient by adding robust
transient fault handling logic. Transient faults are errors that occur
because of some temporary condition such as network connectivity issues
or service unavailability. Typically, if you retry the operation that
resulted in a transient error a short time later, you find that the
error has disappeared.
package com.github.rbuck.retry;
/**
* Represents current retry state.
*
* @author Robert Buck ([email protected])
*/
public class RetryEvent extends java.util.EventObject {
private final RetryState state;
private final Exception cause;
/**
* Constructs a prototypical Event.
*
* @param source The object on which the Event initially occurred.
* @param state the retry state
* @throws IllegalArgumentException if source is null.
*/
public RetryEvent(Object source, RetryState state, Exception cause) {
super(source);
this.state = state;
this.cause = cause;
}
@Override
public Object getSource() {
return super.getSource();
}
public int getRetryCount() {
return state.getRetryCount();
}
public long getRetryDelay() {
return state.getRetryDelay();
}
public Exception getCause() {
return cause;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy