Record Class EsbCounterSnapshot

java.lang.Object
java.lang.Record
com.kingsrook.qqq.esb.stats.EsbCounterSnapshot

public record EsbCounterSnapshot(Long published, Long publishFailures, Long consumed, Long succeeded, Long failed, Long retried, Long deadLettered, Integer inFlight, Instant lastActivity, Long avgMs, Long maxMs, String lastError) extends Record
A point-in-time copy of one destination's or trigger's counters on this node (spec section 7). Component names match the endpoint contract's Counter. Destinations count published and publishFailures; triggers count the rest. avgMs (rounded) and maxMs are over succeeded runs. lastActivity is the time of the latest count of any kind, and lastError the message of the latest failure; both are null until there is one.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EsbCounterSnapshot
    The snapshot for a destination or trigger that hasn't counted anything.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EsbCounterSnapshot(Long published, Long publishFailures, Long consumed, Long succeeded, Long failed, Long retried, Long deadLettered, Integer inFlight, Instant lastActivity, Long avgMs, Long maxMs, String lastError)
    Creates an instance of a EsbCounterSnapshot record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the avgMs record component.
    Returns the value of the consumed record component.
    Returns the value of the deadLettered record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the failed record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the inFlight record component.
    Returns the value of the lastActivity record component.
    Returns the value of the lastError record component.
    Returns the value of the maxMs record component.
    Returns the value of the published record component.
    Returns the value of the publishFailures record component.
    Returns the value of the retried record component.
    Returns the value of the succeeded record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      public static final EsbCounterSnapshot EMPTY
      The snapshot for a destination or trigger that hasn't counted anything.
  • Constructor Details

    • EsbCounterSnapshot

      public EsbCounterSnapshot(Long published, Long publishFailures, Long consumed, Long succeeded, Long failed, Long retried, Long deadLettered, Integer inFlight, Instant lastActivity, Long avgMs, Long maxMs, String lastError)
      Creates an instance of a EsbCounterSnapshot record class.
      Parameters:
      published - the value for the published record component
      publishFailures - the value for the publishFailures record component
      consumed - the value for the consumed record component
      succeeded - the value for the succeeded record component
      failed - the value for the failed record component
      retried - the value for the retried record component
      deadLettered - the value for the deadLettered record component
      inFlight - the value for the inFlight record component
      lastActivity - the value for the lastActivity record component
      avgMs - the value for the avgMs record component
      maxMs - the value for the maxMs record component
      lastError - the value for the lastError 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.
    • published

      public Long published()
      Returns the value of the published record component.
      Returns:
      the value of the published record component
    • publishFailures

      public Long publishFailures()
      Returns the value of the publishFailures record component.
      Returns:
      the value of the publishFailures record component
    • consumed

      public Long consumed()
      Returns the value of the consumed record component.
      Returns:
      the value of the consumed record component
    • succeeded

      public Long succeeded()
      Returns the value of the succeeded record component.
      Returns:
      the value of the succeeded record component
    • failed

      public Long failed()
      Returns the value of the failed record component.
      Returns:
      the value of the failed record component
    • retried

      public Long retried()
      Returns the value of the retried record component.
      Returns:
      the value of the retried record component
    • deadLettered

      public Long deadLettered()
      Returns the value of the deadLettered record component.
      Returns:
      the value of the deadLettered record component
    • inFlight

      public Integer inFlight()
      Returns the value of the inFlight record component.
      Returns:
      the value of the inFlight record component
    • lastActivity

      public Instant lastActivity()
      Returns the value of the lastActivity record component.
      Returns:
      the value of the lastActivity record component
    • avgMs

      public Long avgMs()
      Returns the value of the avgMs record component.
      Returns:
      the value of the avgMs record component
    • maxMs

      public Long maxMs()
      Returns the value of the maxMs record component.
      Returns:
      the value of the maxMs record component
    • lastError

      public String lastError()
      Returns the value of the lastError record component.
      Returns:
      the value of the lastError record component