public class StatsCollectionHandler extends Object implements EventHandler
EventHandler
which collects performance statistics about the
Assembler and its components.Constructor and Description |
---|
StatsCollectionHandler() |
Modifier and Type | Method and Description |
---|---|
void |
failed(Event event,
Map<String,Object> properties)
Used to indicate to the handler that a particular event has
finished with an error.
|
String |
getErrorTopic() |
StatsMap |
getStats()
Returns a map from event topics to timing statistics for that
topic.
|
void |
reset()
Clears the collected statistics
|
void |
started(Event event,
Map<String,Object> properties)
Used to indicate to the handler that a particular event has started.
|
void |
succeeded(Event event,
Map<String,Object> properties)
Used to indicate to the handler that a particular event has
finished successfully.
|
public String getErrorTopic()
null
otherwisepublic void started(Event event, Map<String,Object> properties)
EventHandler
started
in interface EventHandler
event
- The eventproperties
- Any properties associated with the start of the eventpublic void succeeded(Event event, Map<String,Object> properties)
EventHandler
succeeded
in interface EventHandler
event
- The eventproperties
- Any properties associated with the successful
completion of the eventpublic void failed(Event event, Map<String,Object> properties)
EventHandler
failed
in interface EventHandler
event
- The eventproperties
- Any properties associated with the failure of the eventpublic StatsMap getStats()
StatsCollectionHandler
and may thus change while being
processed.public void reset()
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.