public class ErrorCounter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicInteger |
errorCounter |
protected java.util.concurrent.atomic.AtomicLong |
lastError |
protected java.util.concurrent.atomic.AtomicLong |
lastTested |
protected long |
lockTimeout |
protected int |
maxErrors |
protected long |
windowLength |
| Modifier | Constructor and Description |
|---|---|
protected |
ErrorCounter(long windowLength,
long lockTimeout,
int maxErrors) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
increment(long now) |
protected boolean |
isAvailable(long now) |
protected boolean |
isEmpty() |
protected void |
reset() |
protected final long windowLength
protected final long lockTimeout
protected final int maxErrors
protected final java.util.concurrent.atomic.AtomicInteger errorCounter
protected final java.util.concurrent.atomic.AtomicLong lastError
protected final java.util.concurrent.atomic.AtomicLong lastTested