|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.is24.util.monitoring.Counter
public class Counter
Counters are used to count events. Counters can only be incremented by 1
Examples : number of XYZ errors / Exceptions number of handled events number of failed events
| Field Summary | |
|---|---|
private AtomicLong |
count
|
private String |
fName
|
private static org.apache.log4j.Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
Counter(String name)
This class is only constructed by InApplicationMonitor |
|
| Method Summary | |
|---|---|
void |
accept(ReportVisitor aVisitor)
Implements the visitor pattern to read this Counter |
long |
getCount()
get the value of this counter |
String |
getName()
|
void |
increment()
Increment the value of this counter by one |
void |
increment(long increment)
Increase the counter by the specified amount. |
void |
initialize()
Initialize with 0 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.log4j.Logger LOGGER
private final String fName
private final AtomicLong count
| Constructor Detail |
|---|
Counter(String name)
InApplicationMonitor
name - name of this Counter| Method Detail |
|---|
public void accept(ReportVisitor aVisitor)
accept in interface Reportablepublic void increment()
public void increment(long increment)
Increase the counter by the specified amount.
increment - the added to addpublic void initialize()
public long getCount()
public String getName()
getName in interface Reportable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||