Record Class DiagnosticEvent
java.lang.Object
java.lang.Record
io.higson.runtime.diagnostic.queue.DiagnosticEvent
- Record Components:
instanceId- instance identifiereventCode- event typedata- optional payload; may benulltimestamp- event timestamp
public record DiagnosticEvent(String instanceId, DiagnosticEventCode eventCode, DiagnosticData data, LocalDateTime timestamp)
extends Record
Immutable representation of a single diagnostic event that flows through
DiagnosticQueue.-
Constructor Summary
ConstructorsConstructorDescriptionDiagnosticEvent(String instanceId, DiagnosticEventCode eventCode, DiagnosticData data, LocalDateTime timestamp) Creates an instance of aDiagnosticEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theeventCoderecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinstanceIdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DiagnosticEvent
public DiagnosticEvent(String instanceId, DiagnosticEventCode eventCode, DiagnosticData data, LocalDateTime timestamp) Creates an instance of aDiagnosticEventrecord class.- Parameters:
instanceId- the value for theinstanceIdrecord componenteventCode- the value for theeventCoderecord componentdata- the value for thedatarecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
instanceId
Returns the value of theinstanceIdrecord component.- Returns:
- the value of the
instanceIdrecord component
-
eventCode
Returns the value of theeventCoderecord component.- Returns:
- the value of the
eventCoderecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-