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 boolean
equals(java.lang.Object o)
Attributes
getAttributes()
java.lang.String
getEventType()
long
getTimestamp()
int
hashCode()
java.lang.String
toString()
-
-
-
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.
-
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:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-