Record Class SagaMetricsSnapshot

java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaMetricsSnapshot
Record Components:
activeSagas - currently active executions
completedSagas - completed terminal executions
failedSagas - failed terminal executions
cancelledSagas - cancelled terminal executions
timedOutSagas - timed-out terminal executions
runningSteps - currently running steps
compensations - compensation attempts recorded
retries - retry attempts recorded
deadLetters - durable dead-letter records created
outboxPending - pending durable outbox commands
recoveries - recovery runs completed
rejectedOperations - rejected operations such as backpressure violations
All Implemented Interfaces:
Serializable

public record SagaMetricsSnapshot(long activeSagas, long completedSagas, long failedSagas, long cancelledSagas, long timedOutSagas, long runningSteps, long compensations, long retries, long deadLetters, long outboxPending, long recoveries, long rejectedOperations) extends Record implements Serializable
Safe saga metrics snapshot.

Metrics are point-in-time counters maintained by the saga service. They are safe for status output and contain no command payloads.

See Also:
  • Constructor Details

    • SagaMetricsSnapshot

      public SagaMetricsSnapshot(long activeSagas, long completedSagas, long failedSagas, long cancelledSagas, long timedOutSagas, long runningSteps, long compensations, long retries, long deadLetters, long outboxPending, long recoveries, long rejectedOperations)
      Creates a validated metrics snapshot.
  • 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 the compare method from their corresponding wrapper classes.
      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.
    • activeSagas

      public long activeSagas()
      Returns the value of the activeSagas record component.
      Returns:
      the value of the activeSagas record component
    • completedSagas

      public long completedSagas()
      Returns the value of the completedSagas record component.
      Returns:
      the value of the completedSagas record component
    • failedSagas

      public long failedSagas()
      Returns the value of the failedSagas record component.
      Returns:
      the value of the failedSagas record component
    • cancelledSagas

      public long cancelledSagas()
      Returns the value of the cancelledSagas record component.
      Returns:
      the value of the cancelledSagas record component
    • timedOutSagas

      public long timedOutSagas()
      Returns the value of the timedOutSagas record component.
      Returns:
      the value of the timedOutSagas record component
    • runningSteps

      public long runningSteps()
      Returns the value of the runningSteps record component.
      Returns:
      the value of the runningSteps record component
    • compensations

      public long compensations()
      Returns the value of the compensations record component.
      Returns:
      the value of the compensations record component
    • retries

      public long retries()
      Returns the value of the retries record component.
      Returns:
      the value of the retries record component
    • deadLetters

      public long deadLetters()
      Returns the value of the deadLetters record component.
      Returns:
      the value of the deadLetters record component
    • outboxPending

      public long outboxPending()
      Returns the value of the outboxPending record component.
      Returns:
      the value of the outboxPending record component
    • recoveries

      public long recoveries()
      Returns the value of the recoveries record component.
      Returns:
      the value of the recoveries record component
    • rejectedOperations

      public long rejectedOperations()
      Returns the value of the rejectedOperations record component.
      Returns:
      the value of the rejectedOperations record component