Package com.newrelic.telemetry.events
Class Event
- java.lang.Object
-
- com.newrelic.telemetry.events.Event
-
-
Constructor Summary
Constructors Constructor Description Event(Event other)Copy constructor for events.Event(java.lang.String eventType, Attributes attributes)Create an event with System.currentTimeMillis as the timestamp.Event(java.lang.String eventType, Attributes attributes, long timestamp)Create an event with the given timestamp as the timestamp, in ms since unix epoch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)AttributesgetAttributes()java.lang.StringgetEventType()longgetTimestamp()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Event
public Event(java.lang.String eventType, Attributes attributes, long timestamp)Create an event with the given timestamp as the timestamp, in ms since unix epoch.- Parameters:
eventType- The type of event.attributes- The key-value pairs that make up the event.timestamp- time stamp in epoch milliseconds
-
Event
public Event(Event other)
Copy constructor for events.- Parameters:
other- The event to copy
-
Event
public Event(java.lang.String eventType, Attributes attributes)Create an event with System.currentTimeMillis as the timestamp.- Parameters:
eventType- The type of event.attributes- The key-value pairs that make up the event.
-
-
Method Detail
-
getEventType
public java.lang.String getEventType()
-
getAttributes
public Attributes getAttributes()
-
getTimestamp
public long getTimestamp()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-