Class StoreTimeObservation.Healthy
java.lang.Object
com.revetsec.StoreTimeObservation.Healthy
- All Implemented Interfaces:
StoreTimeObservation
- Enclosing interface:
StoreTimeObservation
@Immutable
@CheckReturnValue
public static final class StoreTimeObservation.Healthy
extends Object
implements StoreTimeObservation
An admitted UTC observation with a fixed generation profile.
The profile is maximum advance rate 2, maximum worker offset five seconds and a declared UTC-error bound from zero through 250 milliseconds. Engines must authenticate the root binding and verify the profile, floors, causal health and original operation budget before using this statement.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface StoreTimeObservation
StoreTimeObservation.Healthy, StoreTimeObservation.UnavailableModifier and TypeInterfaceDescriptionstatic final classAn admitted UTC observation with a fixed generation profile.static final classTime is unavailable while the authority/data admission metadata remains obtainable. -
Method Summary
Modifier and TypeMethodDescriptionfromObservation(@NonNull StoreAdmission admission, @NonNull String clockGeneration, @NonNull Instant observedAt, @NonNull Duration maximumUtcError) Validates a backend's UTC statement without authenticating or admitting it.Returns the active authority and data/recovery identities.Returns the admitted time incarnation's identity.Returns the supported maximum UTC advance per measured elapsed second.Returns the declared UTC-error bound fixed for this generation.Returns the supported maximum worker-wall-clock offset, independent of protocol skew.Returns the exact UTC observation, without rounding or clamping.toString()Returns a fixed description that discloses no time, profile or identifier.
-
Method Details
-
fromObservation
public static @NonNull StoreTimeObservation.Healthy fromObservation(@NonNull StoreAdmission admission, @NonNull String clockGeneration, @NonNull Instant observedAt, @NonNull Duration maximumUtcError) Validates a backend's UTC statement without authenticating or admitting it.- Parameters:
admission- the active authority and data/recovery identitiesclockGeneration- canonical unpadded Base64URL encoding of exactly 32 bytesobservedAt- UTC instant with epoch seconds in 0 through 253402300799, preserving nanosecondsmaximumUtcError- the fixed generation's declared bound, zero through 250 milliseconds inclusive- Returns:
- the immutable observation
- Throws:
NullPointerException- if an argument isnullIllegalArgumentException- if an identifier, instant or error bound is outside the supported profile- Since:
- 1.0.0
-
getAdmission
Returns the active authority and data/recovery identities.- Specified by:
getAdmissionin interfaceStoreTimeObservation- Returns:
- the admission metadata
- Since:
- 1.0.0
-
getClockGeneration
Returns the admitted time incarnation's identity.- Returns:
- the canonical clock-generation identifier
- Since:
- 1.0.0
-
getObservedAt
Returns the exact UTC observation, without rounding or clamping.- Returns:
- the observed instant
- Since:
- 1.0.0
-
getMaximumUtcError
Returns the declared UTC-error bound fixed for this generation.- Returns:
- the maximum error
- Since:
- 1.0.0
-
getMaximumUtcAdvanceRate
Returns the supported maximum UTC advance per measured elapsed second.- Returns:
- the fixed boxed rate, 2
- Since:
- 1.0.0
-
getMaximumWorkerClockOffset
Returns the supported maximum worker-wall-clock offset, independent of protocol skew.- Returns:
- the fixed five-second bound
- Since:
- 1.0.0
-
toString
-