com.stackify.api.common.error
public class ErrorCounter extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ErrorCounter.MinuteCounter
Unix epoch minute and error count for that minute
|
| Constructor and Description |
|---|
ErrorCounter() |
| Modifier and Type | Method and Description |
|---|---|
static com.stackify.api.ErrorItem |
getBaseError(com.stackify.api.StackifyError error)
Gets the base error (the last error in the causal chain)
|
static String |
getUniqueKey(com.stackify.api.ErrorItem errorItem)
Generates a unique key based on the error.
|
int |
incrementCounter(com.stackify.api.StackifyError error,
long epochMinute)
Increments the counter for this error in the epoch minute specified
|
void |
purgeCounters(long epochMinute)
Purges the errorCounter map of expired entries
|
public static com.stackify.api.ErrorItem getBaseError(com.stackify.api.StackifyError error)
error - The errorpublic static String getUniqueKey(com.stackify.api.ErrorItem errorItem)
errorItem - The error itempublic int incrementCounter(com.stackify.api.StackifyError error,
long epochMinute)
error - The errorepochMinute - The epoch minutepublic void purgeCounters(long epochMinute)
epochMinute - The current timeCopyright © 2014 Stackify, LLC. All Rights Reserved.