Record Class LatencyFigure
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.optimizer.context.LatencyFigure
- Record Components:
roundTripMs- the round trip in ms, ornullwhen unknownbasis- how the figure was obtainednote- detail for the reader (which pair was measured, the factor used); nevernull
public record LatencyFigure(Double roundTripMs, LatencyFigure.Basis basis, String note)
extends Record
One round-trip latency with where it came from. Unknown is a first-class value: an
LatencyFigure.Basis.UNKNOWN figure has no number at all.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow a latency figure was obtained. -
Constructor Summary
ConstructorsConstructorDescriptionLatencyFigure(Double roundTripMs, LatencyFigure.Basis basis, String note) Rejects a number on an unknown figure and a missing number on a known one. -
Method Summary
Modifier and TypeMethodDescriptionbasis()Returns the value of thebasisrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleannote()Returns the value of thenoterecord component.render()Returns the value of theroundTripMsrecord component.final StringtoString()Returns a string representation of this record class.static LatencyFigurevalue()
-
Constructor Details
-
LatencyFigure
Rejects a number on an unknown figure and a missing number on a known one.
-
-
Method Details
-
unknown
- Parameters:
reason- why the latency is unknown- Returns:
- an unknown figure
-
value
- Returns:
- the figure, or empty when unknown
-
isMeasured
public boolean isMeasured()- Returns:
truefor a Fabric measurement
-
render
- Returns:
- the figure as
12.3 ms (measured), orunknown
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
roundTripMs
Returns the value of theroundTripMsrecord component.- Returns:
- the value of the
roundTripMsrecord component
-
basis
-
note
-