public class ErrorCounter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ErrorCounter.Status |
| Modifier and Type | Field and Description |
|---|---|
protected long[] |
errors |
protected int |
lastPos |
protected long |
lockTimeout |
protected ErrorCounter.Status |
prevStatus |
protected long |
windowLength |
| Modifier | Constructor and Description |
|---|---|
protected |
ErrorCounter(long windowLength,
long lockTimeout,
int maxErrors) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canRemove(long now) |
protected int |
getErrorCounter(long now) |
protected long |
getLastError() |
protected ErrorCounter.Status |
getStatus(long now) |
protected boolean |
isAvailable(long now) |
protected void |
onError(long now) |
protected void |
onSuccess() |
protected final long windowLength
protected final long lockTimeout
protected final int lastPos
protected ErrorCounter.Status prevStatus
protected final long[] errors
protected ErrorCounter(long windowLength,
long lockTimeout,
int maxErrors)
protected void onError(long now)
protected void onSuccess()
protected boolean canRemove(long now)
protected ErrorCounter.Status getStatus(long now)
protected boolean isAvailable(long now)
protected int getErrorCounter(long now)
protected long getLastError()