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.
-
Constructor Summary
ConstructorsConstructorDescriptionPingResponse(long clientTime, long serverTime, String tachyonServerName, boolean redisOnline, boolean mongoOnline, boolean healthy) Creates an instance of aPingResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theclientTimerecord component.longclockDriftMs(long clientReceiveTime) Estimates clock skew / drift (in ms) between client and backend server clocks.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhealthy()Returns the value of thehealthyrecord component.booleanReturns the value of themongoOnlinerecord component.booleanReturns the value of theredisOnlinerecord component.longroundTripLatencyMs(long clientReceiveTime) Calculates the total Round-Trip Time (RTT) in milliseconds.longReturns the value of theserverTimerecord component.Returns the value of thetachyonServerNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PingResponse
public PingResponse(long clientTime, long serverTime, String tachyonServerName, boolean redisOnline, boolean mongoOnline, boolean healthy) Creates an instance of aPingResponserecord class.- Parameters:
clientTime- the value for theclientTimerecord componentserverTime- the value for theserverTimerecord componenttachyonServerName- the value for thetachyonServerNamerecord componentredisOnline- the value for theredisOnlinerecord componentmongoOnline- the value for themongoOnlinerecord componenthealthy- the value for thehealthyrecord 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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
clientTime
public long clientTime()Returns the value of theclientTimerecord component.- Returns:
- the value of the
clientTimerecord component
-
serverTime
public long serverTime()Returns the value of theserverTimerecord component.- Returns:
- the value of the
serverTimerecord component
-
tachyonServerName
Returns the value of thetachyonServerNamerecord component.- Returns:
- the value of the
tachyonServerNamerecord component
-
redisOnline
public boolean redisOnline()Returns the value of theredisOnlinerecord component.- Returns:
- the value of the
redisOnlinerecord component
-
mongoOnline
public boolean mongoOnline()Returns the value of themongoOnlinerecord component.- Returns:
- the value of the
mongoOnlinerecord component
-
healthy
-