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
  • 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 identities
      clockGeneration - canonical unpadded Base64URL encoding of exactly 32 bytes
      observedAt - UTC instant with epoch seconds in 0 through 253402300799, preserving nanoseconds
      maximumUtcError - the fixed generation's declared bound, zero through 250 milliseconds inclusive
      Returns:
      the immutable observation
      Throws:
      NullPointerException - if an argument is null
      IllegalArgumentException - 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:
      getAdmission in interface StoreTimeObservation
      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

      Returns a fixed description that discloses no time, profile or identifier.
      Overrides:
      toString in class Object
      Returns:
      the redacted description
      Since:
      1.0.0