Package ubic.gemma.core.util
Class SimpleRetryContext
java.lang.Object
ubic.gemma.core.util.SimpleRetryContext
Holds the state of a retry attempt.
- Author:
- poirigui
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intIndicate the attempt number (zero for first, 1 for second, etc.)final booleanIndicate if this is the last attempt, any raised exception will bubble up toSimpleRetry.execute(SimpleRetryCallable, Object) -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRetryContext(int attempt, boolean lastAttempt) Creates a newSimpleRetryContextinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintIndicate the attempt number (zero for first, 1 for second, etc.)inthashCode()booleanIndicate if this is the last attempt, any raised exception will bubble up toSimpleRetry.execute(SimpleRetryCallable, Object)toString()
-
Field Details
-
attempt
public final int attemptIndicate the attempt number (zero for first, 1 for second, etc.) -
lastAttempt
public final boolean lastAttemptIndicate if this is the last attempt, any raised exception will bubble up toSimpleRetry.execute(SimpleRetryCallable, Object)
-
-
Constructor Details
-
SimpleRetryContext
public SimpleRetryContext(int attempt, boolean lastAttempt) Creates a newSimpleRetryContextinstance.- Parameters:
attempt- Indicate the attempt number (zero for first, 1 for second, etc.)lastAttempt- Indicate if this is the last attempt, any raised exception will bubble up toSimpleRetry.execute(SimpleRetryCallable, Object)
-
-
Method Details
-
getAttempt
public int getAttempt()Indicate the attempt number (zero for first, 1 for second, etc.) -
isLastAttempt
public boolean isLastAttempt()Indicate if this is the last attempt, any raised exception will bubble up toSimpleRetry.execute(SimpleRetryCallable, Object) -
equals
-
hashCode
public int hashCode() -
toString
-