Record Class PingResponse

java.lang.Object
java.lang.Record
tech.skworks.tachyon.api.system.PingResponse
Record Components:
clientTime - Timestamp (ms) when the client dispatched the probe.
serverTime - Timestamp (ms) when the backend handled the probe.
tachyonServerName - Identifier of the responding Tachyon backend node.
redisOnline - Whether Redis is reachable and responsive.
mongoOnline - Whether MongoDB is reachable and responsive.
healthy - Whether the backend and all required datastores are fully operational.

public record PingResponse(long clientTime, long serverTime, String tachyonServerName, boolean redisOnline, boolean mongoOnline, boolean healthy) extends Record
Detailed telemetry response from a Tachyon backend ping probe.
Since:
2.0.0-SNAPSHOT
Version:
1.0
Author:
Jimmy (vSKAH)
  • Constructor Details

    • PingResponse

      public PingResponse(long clientTime, long serverTime, String tachyonServerName, boolean redisOnline, boolean mongoOnline, boolean healthy)
      Creates an instance of a PingResponse record class.
      Parameters:
      clientTime - the value for the clientTime record component
      serverTime - the value for the serverTime record component
      tachyonServerName - the value for the tachyonServerName record component
      redisOnline - the value for the redisOnline record component
      mongoOnline - the value for the mongoOnline record component
      healthy - the value for the healthy record component
  • Method Details

    • roundTripLatencyMs

      public long roundTripLatencyMs(long clientReceiveTime)
      Calculates the total Round-Trip Time (RTT) in milliseconds.
    • clockDriftMs

      public long clockDriftMs(long clientReceiveTime)
      Estimates clock skew / drift (in ms) between client and backend server clocks.
    • 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.
    • clientTime

      public long clientTime()
      Returns the value of the clientTime record component.
      Returns:
      the value of the clientTime record component
    • serverTime

      public long serverTime()
      Returns the value of the serverTime record component.
      Returns:
      the value of the serverTime record component
    • tachyonServerName

      public String tachyonServerName()
      Returns the value of the tachyonServerName record component.
      Returns:
      the value of the tachyonServerName record component
    • redisOnline

      public boolean redisOnline()
      Returns the value of the redisOnline record component.
      Returns:
      the value of the redisOnline record component
    • mongoOnline

      public boolean mongoOnline()
      Returns the value of the mongoOnline record component.
      Returns:
      the value of the mongoOnline record component
    • healthy

      public boolean healthy()
      Returns the value of the healthy record component.
      Returns:
      the value of the healthy record component