Record Class AppEvent
java.lang.Object
java.lang.Record
com.cockroachlabs.crdb.spi.AppEvent
- Record Components:
kind- event kind (e.g.retry,retry_exhausted,circuit_open)source- logical source of the eventattrs- arbitrary attributes (defensively copied; immutable)epochMillis- event time in epoch milliseconds, supplied by the caller
public record AppEvent(String kind, String source, Map<String,Object> attrs, long epochMillis)
extends Record
An application-level operational signal emitted to Cockroach Aegis (the
"exhaust"). The timestamp is supplied explicitly (never read from the wall
clock inside this type) so producers stay deterministic and testable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattrs()Returns the value of theattrsrecord component.longReturns the value of theepochMillisrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.static AppEventConvenience factory that defensively copiesattrs.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AppEvent
Creates an instance of aAppEventrecord class.- Parameters:
kind- the value for thekindrecord componentsource- the value for thesourcerecord componentattrs- the value for theattrsrecord componentepochMillis- the value for theepochMillisrecord component
-
-
Method Details
-
of
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
kind
-
source
-
attrs
-
epochMillis
public long epochMillis()Returns the value of theepochMillisrecord component.- Returns:
- the value of the
epochMillisrecord component
-