public class MapEventKeeper extends java.lang.Object implements EventKeeper
EventKeeper
spec). It holds all counters in memory;EventKeeper.Event, EventKeeper.Events
Constructor and Description |
---|
MapEventKeeper() |
Modifier and Type | Method and Description |
---|---|
void |
count(EventKeeper.Event event,
long amt)
Count the number of events which occurred.
|
long |
getCount(EventKeeper.Event event)
Get the number of events which occurred since this timer was created.
|
long |
getTimeNanos(EventKeeper.Event event)
Get the amount of time taken by this event, in nanoseconds.
|
void |
timeNanos(EventKeeper.Event event,
long nanos)
Count the time taken to perform an event, in nanoseconds.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTime, increment, time
public void count(EventKeeper.Event event, long amt)
EventKeeper
count
in interface EventKeeper
event
- the event which occurredamt
- the number of times that even occurredpublic void timeNanos(EventKeeper.Event event, long nanos)
EventKeeper
event.isTimeEvent()
should return true here.timeNanos
in interface EventKeeper
event
- the event which was timed (the event should be a time event).nanos
- the amount of time taken (in nanoseconds)public long getCount(EventKeeper.Event event)
EventKeeper
getCount
in interface EventKeeper
event
- the event to get the count forpublic long getTimeNanos(EventKeeper.Event event)
EventKeeper
getTimeNanos
in interface EventKeeper
event
- the event to get the time for