projects
/
rhynodge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store failed states and fail count, too.
[rhynodge.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
reactor
/
states
/
AbstractState.java
diff --git
a/src/main/java/net/pterodactylus/reactor/states/AbstractState.java
b/src/main/java/net/pterodactylus/reactor/states/AbstractState.java
index
674f4af
..
31a1d18
100644
(file)
--- a/
src/main/java/net/pterodactylus/reactor/states/AbstractState.java
+++ b/
src/main/java/net/pterodactylus/reactor/states/AbstractState.java
@@
-41,6
+41,9
@@
public abstract class AbstractState implements State {
/** The optional exception that occured while retrieving the state. */
private final Throwable exception;
/** 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.
*/
/**
* Creates a new successful state.
*/
@@
-108,6
+111,22
@@
public abstract class AbstractState implements State {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
+ public int failCount() {
+ return failCount;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFailCount(int failCount) {
+ this.failCount = failCount;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public Throwable exception() {
return exception;
}
public Throwable exception() {
return exception;
}