public class EventCounter extends Object implements EventHandler
EventHandler implementation which counts the number
of events that complete (successfully or not).| Constructor and Description |
|---|
EventCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
failed(Event event,
Map<String,Object> properties)
Increments the count of events that have finished
|
long |
get() |
long |
getSecondsSinceStart()
Returns seconds since counter was started.
|
long |
getStartTime()
Returns the clock time in seconds, when counter was initialized.
|
void |
started(Event event,
Map<String,Object> properties)
Empty implementation of
started() |
void |
succeeded(Event event,
Map<String,Object> properties)
Increments the count of events that have finished
|
public long get()
public void started(Event event, Map<String,Object> properties)
started()started in interface EventHandlerevent - The eventproperties - Any properties associated with the start of the eventpublic void succeeded(Event event, Map<String,Object> properties)
succeeded in interface EventHandlerevent - The eventproperties - Any properties associated with the successful
completion of the eventpublic void failed(Event event, Map<String,Object> properties)
failed in interface EventHandlerevent - The eventproperties - Any properties associated with the failure of the eventpublic long getSecondsSinceStart()
public long getStartTime()
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.