Record Class AppEvent
java.lang.Object
java.lang.Record
com.cockroachlabs.data.continuum.aegis.AppEvent
- Record Components:
kind- event kind, e.g.retry,circuit_opensource- originating component (class/method)attrs- arbitrary structured attributesepochMillis- event timestamp; pass explicitly for deterministic tests
public record AppEvent(String kind, String source, Map<String,Object> attrs, long epochMillis)
extends Record
An application-side operational event published to Cockroach Aegis ("exhaust").
The library sees app intent + DB behavior the cluster alone cannot attribute
(retry storms, circuit trips), so this feeds Aegis high-signal data.
-
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 stampingSystem.currentTimeMillis().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
-
now
Convenience factory stampingSystem.currentTimeMillis(). -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
attrs
Returns the value of theattrsrecord component.- Returns:
- the value of the
attrsrecord component
-
epochMillis
public long epochMillis()Returns the value of theepochMillisrecord component.- Returns:
- the value of the
epochMillisrecord component
-