public class Counter extends Object implements Reportable
Examples : number of XYZ errors / Exceptions number of handled events number of failed events
| Modifier and Type | Field and Description |
|---|---|
private AtomicLong |
count |
private String |
fName |
private static org.apache.log4j.Logger |
LOGGER |
| Constructor and Description |
|---|
Counter(String name)
This class is only constructed by
InApplicationMonitor |
| Modifier and Type | Method and Description |
|---|---|
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
|
private static final org.apache.log4j.Logger LOGGER
private final String fName
private final AtomicLong count
Counter(String name)
InApplicationMonitorname - name of this Counterpublic 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 ReportableCopyright © 2013 Immobilien Scout GmbH. All Rights Reserved.