Record Class RegressionAlertEvent

java.lang.Object
java.lang.Record
dev.dokimos.server.service.RegressionAlertEvent
Record Components:
projectId - the project whose enabled webhooks should receive the alert
payload - the alert body to deliver

public record RegressionAlertEvent(UUID projectId, RegressionAlertPayload payload) extends Record
Published inside the run-completion transaction when a run regresses, and consumed only after that transaction commits. Carrying the resolved projectId and the ready-to-send payload keeps the after-commit listener free of further entity loads on a possibly closed persistence context.
  • Constructor Details

    • RegressionAlertEvent

      public RegressionAlertEvent(UUID projectId, RegressionAlertPayload payload)
      Creates an instance of a RegressionAlertEvent record class.
      Parameters:
      projectId - the value for the projectId record component
      payload - the value for the payload record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • projectId

      public UUID projectId()
      Returns the value of the projectId record component.
      Returns:
      the value of the projectId record component
    • payload

      public RegressionAlertPayload payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component