Class TotpStoreSnapshot
java.lang.Object
com.revetsec.totp.TotpStoreSnapshot
Complete immutable authoritative observations within exactly one namespace and recovery epoch.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TotpStoreSnapshotfromEntries(@NonNull Set<@NonNull TotpStoreKey> requestedKeys, @NonNull Map<@NonNull TotpStoreKey, @NonNull TotpStoreEntry> entries, @NonNull StoreTimeObservation timeObservation) Constructs a complete, bounded snapshot with one explicit observation per requested address.Returns all immutable requested observations.getEntry(@NonNull TotpStoreKey key) Returns an observation; an unrequested address is invalid.Returns the admitted time metadata from the same atomic snapshot as every entry.toString()Redacts all observations.
-
Method Details
-
fromEntries
public static @NonNull TotpStoreSnapshot fromEntries(@NonNull Set<@NonNull TotpStoreKey> requestedKeys, @NonNull Map<@NonNull TotpStoreKey, @NonNull TotpStoreEntry> entries, @NonNull StoreTimeObservation timeObservation) Constructs a complete, bounded snapshot with one explicit observation per requested address.- Parameters:
requestedKeys- the exact nonempty set of at most 16 keys in one scopeentries- the matching present or absent observationstimeObservation- the admitted time or time-only unavailability coherent with these entries- Returns:
- the immutable snapshot
- Since:
- 1.0.0
-
getEntries
Returns all immutable requested observations.- Returns:
- the exact read set
- Since:
- 1.0.0
-
getEntry
Returns an observation; an unrequested address is invalid.- Parameters:
key- a requested address- Returns:
- its explicit observation
- Since:
- 1.0.0
-
getTimeObservation
Returns the admitted time metadata from the same atomic snapshot as every entry.- Returns:
- the coherent time observation
- Since:
- 1.0.0
-
toString
-