public class SystemEvent extends Object implements Comparable<SystemEvent>, Iterable<Map.Entry<String,String>>, Serializable, UseDefaultConverter, Cloneable
A series of events may be linked to each other using correlationIds. The first event in the series should have its correlationState set to SystemEvent.CorrelationState.START
. The last event in the
series should have its correlationState set to SystemEvent.CorrelationState.END
. Any
correlated events in between the start and end should have their correlationState set to SystemEvent.CorrelationState.INTERMEDIATE
. All events
in the series must share the same correlationId. The system does not enforce any of these conventions. Correlation IDs must be 255 characters or less.
Modifier and Type | Class and Description |
---|---|
static class |
SystemEvent.Acknowledgement |
static class |
SystemEvent.CorrelationState |
static class |
SystemEvent.Severity |
Constructor and Description |
---|
SystemEvent()
Default constructor that sets the id to a random GUID, the date to
System.currentTimeMillis() , and severity to SystemEvent.Severity.SYS_INFO |
SystemEvent(SystemEvent.Severity severity,
String subsystem,
String description)
Constructor, date set to
System.currentTimeMillis() |
Modifier and Type | Method and Description |
---|---|
SystemEvent |
addMetadata(String key,
boolean value)
Returns this event.
|
SystemEvent |
addMetadata(String key,
double value)
Returns this event.
|
SystemEvent |
addMetadata(String key,
float value)
Returns this event.
|
SystemEvent |
addMetadata(String key,
int value)
Returns this event.
|
SystemEvent |
addMetadata(String key,
long value)
Returns this event.
|
SystemEvent |
addMetadata(String key,
String value)
Returns this event.
|
SystemEvent |
addMetadata(String key,
Throwable t)
Adds the Exception's messages and all messages of all causes to the event in the form:
|
SystemEvent |
clone() |
int |
compareTo(SystemEvent other) |
boolean |
containsMetadata(String key)
True if the specified metdata key has a value in this event.
|
boolean |
equals(Object obj) |
SystemEvent.Acknowledgement |
getAcknowledgement() |
String |
getCorrelationId() |
SystemEvent.CorrelationState |
getCorrelationState() |
long |
getDate()
Date of the event.
|
String |
getDescription() |
long |
getId() |
BaseTypesMap<String,String> |
getMetadata() |
String |
getMetadata(String key)
Returns the value of the metadata key or null if it does not exist.
|
boolean |
getMetadata(String key,
boolean defaultValue)
Returns the value of the metadata key or null if it does not exist.
|
double |
getMetadata(String key,
double defaultValue)
Returns the value of the metadata key or null if it does not exist.
|
float |
getMetadata(String key,
float defaultValue)
Returns the value of the metadata key or null if it does not exist.
|
int |
getMetadata(String key,
int defaultValue)
Returns the value of the metadata key or null if it does not exist.
|
long |
getMetadata(String key,
long defaultValue)
Returns the value of the metadata key or null if it does not exist.
|
String |
getMetadata(String key,
String defaultValue)
Returns the value of the metadata key or null if it does not exist.
|
String |
getNodeset()
The name of the nodeset that produced the event.
|
SystemEvent.Severity |
getSeverity() |
String |
getSubsystem()
The AIE subsytem that caused the event.
|
int |
hashCode() |
Iterator<Map.Entry<String,String>> |
iterator()
metadata about the event.
|
void |
setAcknowledgement(SystemEvent.Acknowledgement acknowledgement) |
void |
setCorrelationId(String correlationId) |
void |
setCorrelationState(SystemEvent.CorrelationState correlationState) |
void |
setDate(long date) |
void |
setDescription(String message) |
void |
setId(long id) |
void |
setMetadata(BaseTypesMap<String,String> metadata) |
void |
setNodeset(String nodeset) |
void |
setSeverity(SystemEvent.Severity severity) |
void |
setSubsystem(String subsystem) |
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public SystemEvent()
System.currentTimeMillis()
, and severity to SystemEvent.Severity.SYS_INFO
public SystemEvent(SystemEvent.Severity severity, String subsystem, String description)
System.currentTimeMillis()
public long getId()
public void setId(long id)
public String getSubsystem()
public void setSubsystem(String subsystem)
public BaseTypesMap<String,String> getMetadata()
public void setMetadata(BaseTypesMap<String,String> metadata)
public String getDescription()
public void setDescription(String message)
public SystemEvent.Severity getSeverity()
public void setSeverity(SystemEvent.Severity severity)
public long getDate()
System.currentTimeMillis()
but settable by code. (for GC case)public void setDate(long date)
public String getCorrelationId()
public void setCorrelationId(String correlationId)
public SystemEvent.CorrelationState getCorrelationState()
public void setCorrelationState(SystemEvent.CorrelationState correlationState)
public SystemEvent addMetadata(String key, String value)
public SystemEvent addMetadata(String key, int value)
public SystemEvent addMetadata(String key, long value)
public SystemEvent addMetadata(String key, double value)
public SystemEvent addMetadata(String key, boolean value)
public SystemEvent addMetadata(String key, float value)
public SystemEvent addMetadata(String key, Throwable t)
key.message.0 = top level exception message key.message.1 = cause of top level message key.message.2 = cause of first caused exception key.message.n = root cause message
public boolean containsMetadata(String key)
public String getMetadata(String key)
public String getMetadata(String key, String defaultValue)
public int getMetadata(String key, int defaultValue)
public long getMetadata(String key, long defaultValue)
public float getMetadata(String key, float defaultValue)
public double getMetadata(String key, double defaultValue)
public boolean getMetadata(String key, boolean defaultValue)
public Iterator<Map.Entry<String,String>> iterator()
public int compareTo(SystemEvent other)
compareTo
in interface Comparable<SystemEvent>
public String getNodeset()
public void setNodeset(String nodeset)
public SystemEvent.Acknowledgement getAcknowledgement()
public void setAcknowledgement(SystemEvent.Acknowledgement acknowledgement)
public SystemEvent clone()
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.