public abstract class AbstractMercuryEvent extends Object implements MercuryEvent
MercuryEvent.EventMask| Constructor and Description |
|---|
AbstractMercuryEvent() |
AbstractMercuryEvent(EventTypeEnum type,
String name) |
AbstractMercuryEvent(EventTypeEnum type,
String name,
String info) |
| Modifier and Type | Method and Description |
|---|---|
long |
getDuration()
duration of this event in millis
|
String |
getInfo()
information for this event.
|
String |
getName()
event name inside type
|
Map<String,Object> |
getPayload()
event's payload
|
Object |
getPayload(String name)
get one of payload values
|
String |
getResult()
result field
|
long |
getStart()
get the event start time as UTC timestapm
|
String |
getTag()
aggregation tag of this event.
|
EventTypeEnum |
getType()
event type
|
boolean |
hasResult() |
void |
setInfo(String info) |
void |
setPayload(Map<String,Object> payload)
set the whole payload
|
void |
setPayload(String name,
Object value)
set the whole payload
|
void |
setResult(String result) |
void |
setTag(String tag) |
void |
start()
start the event
|
void |
stop()
stop the event and calculate the duration
|
public AbstractMercuryEvent()
public AbstractMercuryEvent(EventTypeEnum type, String name)
public AbstractMercuryEvent(EventTypeEnum type, String name, String info)
public long getDuration()
MercuryEventgetDuration in interface MercuryEventpublic Map<String,Object> getPayload()
MercuryEventgetPayload in interface MercuryEventpublic long getStart()
MercuryEventgetStart in interface MercuryEventpublic EventTypeEnum getType()
MercuryEventgetType in interface MercuryEventpublic String getName()
MercuryEventgetName in interface MercuryEventpublic String getInfo()
MercuryEventgetInfo in interface MercuryEventpublic String getTag()
MercuryEventgetTag in interface MercuryEventpublic String getResult()
MercuryEventgetResult in interface MercuryEventpublic void setResult(String result)
setResult in interface MercuryEventpublic void setTag(String tag)
setTag in interface MercuryEventpublic void setInfo(String info)
setInfo in interface MercuryEventpublic boolean hasResult()
hasResult in interface MercuryEventpublic Object getPayload(String name)
MercuryEventgetPayload in interface MercuryEventname - element namepublic void setPayload(Map<String,Object> payload)
MercuryEventsetPayload in interface MercuryEventpublic void setPayload(String name, Object value)
MercuryEventsetPayload in interface MercuryEventpublic void start()
MercuryEventstart in interface MercuryEventpublic void stop()
MercuryEventstop in interface MercuryEventCopyright © 2002–2013 The Apache Software Foundation. All rights reserved.