public class EventRecord extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_EVENT_NAME |
static String |
FIELD_EVENT_SESSION |
static String |
FIELD_ID |
static String |
FIELD_START_TIME |
static String |
FIELD_SUCCESS |
static String |
INDEX_EVENT_NAME |
static String |
INDEX_EVENT_SESSION |
static String |
INDEX_START_TIME |
static String |
INDEX_SUCCESS |
Constructor and Description |
---|
EventRecord(String serverId,
boolean success,
long startTime,
long time,
Object data,
Event event) |
Modifier and Type | Method and Description |
---|---|
static void |
checkIndexes(org.springframework.data.mongodb.core.MongoTemplate mongo,
String collection)
Ensure that the MongoDB collection has the required indexes for events.
|
String |
getData() |
Event |
getEvent() |
String |
getId() |
String |
getServerId() |
long |
getStartDelay() |
long |
getStartTime() |
long |
getTime() |
String |
getWarning() |
boolean |
isChart() |
boolean |
isSuccess() |
void |
setChart(boolean chart) |
void |
setData(String data) |
void |
setEvent(Event event) |
void |
setId(String id) |
void |
setServerId(String serverId) |
void |
setStartDelay(long startDelay) |
void |
setStartTime(long startTime) |
void |
setSuccess(boolean success) |
void |
setTime(long time) |
void |
setWarning(String warning) |
String |
toString() |
public static final String FIELD_ID
public static final String FIELD_EVENT_NAME
public static final String FIELD_EVENT_SESSION
public static final String FIELD_START_TIME
public static final String FIELD_SUCCESS
public static final String INDEX_EVENT_NAME
public static final String INDEX_EVENT_SESSION
public static final String INDEX_START_TIME
public static final String INDEX_SUCCESS
public EventRecord(String serverId, boolean success, long startTime, long time, Object data, Event event)
serverId
- the server identifiersuccess
- true if this represents a successful event
otherwise falsestartTime
- the time when processing startedtime
- the time it took to process the eventdata
- any additional data that should be recorded with this eventevent
- the event that was processedpublic static void checkIndexes(org.springframework.data.mongodb.core.MongoTemplate mongo, String collection)
mongo
- connection to MongoDBcollection
- name of DB collection containing eventspublic String getServerId()
public void setServerId(String serverId)
public String getId()
public void setId(String id)
public boolean isSuccess()
public void setSuccess(boolean success)
public long getStartTime()
public void setStartTime(long startTime)
public long getStartDelay()
public void setStartDelay(long startDelay)
public long getTime()
public void setTime(long time)
public Event getEvent()
public void setEvent(Event event)
public String getData()
public void setData(String data)
public String getWarning()
public void setWarning(String warning)
public boolean isChart()
public void setChart(boolean chart)
Copyright © 2014. All rights reserved.