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()
MercuryEvent
getDuration
in interface MercuryEvent
public Map<String,Object> getPayload()
MercuryEvent
getPayload
in interface MercuryEvent
public long getStart()
MercuryEvent
getStart
in interface MercuryEvent
public EventTypeEnum getType()
MercuryEvent
getType
in interface MercuryEvent
public String getName()
MercuryEvent
getName
in interface MercuryEvent
public String getInfo()
MercuryEvent
getInfo
in interface MercuryEvent
public String getTag()
MercuryEvent
getTag
in interface MercuryEvent
public String getResult()
MercuryEvent
getResult
in interface MercuryEvent
public void setResult(String result)
setResult
in interface MercuryEvent
public void setTag(String tag)
setTag
in interface MercuryEvent
public void setInfo(String info)
setInfo
in interface MercuryEvent
public boolean hasResult()
hasResult
in interface MercuryEvent
public Object getPayload(String name)
MercuryEvent
getPayload
in interface MercuryEvent
name
- element namepublic void setPayload(Map<String,Object> payload)
MercuryEvent
setPayload
in interface MercuryEvent
public void setPayload(String name, Object value)
MercuryEvent
setPayload
in interface MercuryEvent
public void start()
MercuryEvent
start
in interface MercuryEvent
public void stop()
MercuryEvent
stop
in interface MercuryEvent
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.