Record Class SlowOperationDetector.SlowOperationRecord

java.lang.Object
java.lang.Record
com.loomcache.server.observability.SlowOperationDetector.SlowOperationRecord
Enclosing class:
SlowOperationDetector

public static record SlowOperationDetector.SlowOperationRecord(String nodeId, String peerId, String messageType, int correlationId, String threadName, long startNanos, long observedAtNanos, long elapsedNanos, boolean sampled, List<String> stackTrace) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    SlowOperationRecord(String nodeId, String peerId, String messageType, int correlationId, String threadName, long startNanos, long observedAtNanos, long elapsedNanos, boolean sampled, List<String> stackTrace)
    Creates an instance of a SlowOperationRecord record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the correlationId record component.
    @NonNull Duration
     
    long
    Returns the value of the elapsedNanos record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the messageType record component.
    Returns the value of the nodeId record component.
    long
    Returns the value of the observedAtNanos record component.
    Returns the value of the peerId record component.
    boolean
    Returns the value of the sampled record component.
    Returns the value of the stackTrace record component.
    long
    Returns the value of the startNanos record component.
    Returns the value of the threadName record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • SlowOperationRecord

      public SlowOperationRecord(String nodeId, String peerId, String messageType, int correlationId, String threadName, long startNanos, long observedAtNanos, long elapsedNanos, boolean sampled, List<String> stackTrace)
      Creates an instance of a SlowOperationRecord record class.
      Parameters:
      nodeId - the value for the nodeId record component
      peerId - the value for the peerId record component
      messageType - the value for the messageType record component
      correlationId - the value for the correlationId record component
      threadName - the value for the threadName record component
      startNanos - the value for the startNanos record component
      observedAtNanos - the value for the observedAtNanos record component
      elapsedNanos - the value for the elapsedNanos record component
      sampled - the value for the sampled record component
      stackTrace - the value for the stackTrace record component
  • Method Details

    • duration

      public @NonNull Duration duration()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • nodeId

      public String nodeId()
      Returns the value of the nodeId record component.
      Returns:
      the value of the nodeId record component
    • peerId

      public String peerId()
      Returns the value of the peerId record component.
      Returns:
      the value of the peerId record component
    • messageType

      public String messageType()
      Returns the value of the messageType record component.
      Returns:
      the value of the messageType record component
    • correlationId

      public int correlationId()
      Returns the value of the correlationId record component.
      Returns:
      the value of the correlationId record component
    • threadName

      public String threadName()
      Returns the value of the threadName record component.
      Returns:
      the value of the threadName record component
    • startNanos

      public long startNanos()
      Returns the value of the startNanos record component.
      Returns:
      the value of the startNanos record component
    • observedAtNanos

      public long observedAtNanos()
      Returns the value of the observedAtNanos record component.
      Returns:
      the value of the observedAtNanos record component
    • elapsedNanos

      public long elapsedNanos()
      Returns the value of the elapsedNanos record component.
      Returns:
      the value of the elapsedNanos record component
    • sampled

      public boolean sampled()
      Returns the value of the sampled record component.
      Returns:
      the value of the sampled record component
    • stackTrace

      public List<String> stackTrace()
      Returns the value of the stackTrace record component.
      Returns:
      the value of the stackTrace record component