/** The optional exception that occured while retrieving the state. */
private final Throwable exception;
+ /** The number of consecutive failures. */
+ private int failCount;
+
/**
* Creates a new successful state.
*/
* {@inheritDoc}
*/
@Override
+ public int failCount() {
+ return failCount;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFailCount(int failCount) {
+ this.failCount = failCount;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public Throwable exception() {
return exception;
}