Class TotpStoreWrite
java.lang.Object
com.revetsec.totp.TotpStoreWrite
An atomic comparison of every observed version and absence followed by all mutations or none.
The backend must atomically compare its active recovery epoch too. Versions are generated by
core, authenticated in the envelope, preserved exactly and never reused. There is no deletion,
expiry or eviction operation: permanent fences survive credential removal.
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn insertion or replacement of one permanent record.static enumDistinguishes one-time initialization from updates that cannot recreate the namespace. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull TotpStoreWritefromSnapshotAndMutations(@NonNull TotpStoreWrite.Purpose purpose, @NonNull TotpStoreSnapshot snapshot, @NonNull List<@NonNull TotpStoreWrite.Mutation> mutations, @NonNull StoreTemporalCondition temporalCondition) Combines a complete predicate set with at most 16 distinct insertions or replacements.Returns the authoritative namespace.Returns the immutable mutation list.Returns initialization or update purpose.Returns the recovery epoch that must be checked within the commit transaction.Returns every exact version and absence predicate.Returns the original temporal condition to validate under the final transaction locks.toString()Redacts predicates and mutations.
-
Method Details
-
fromSnapshotAndMutations
public static @NonNull TotpStoreWrite fromSnapshotAndMutations(@NonNull TotpStoreWrite.Purpose purpose, @NonNull TotpStoreSnapshot snapshot, @NonNull List<@NonNull TotpStoreWrite.Mutation> mutations, @NonNull StoreTemporalCondition temporalCondition) Combines a complete predicate set with at most 16 distinct insertions or replacements. Initialization contains exactly the absent namespace record and its insertion. Updates must include a present namespace record predicate. An empty mutation set remains a predicate barrier.- Parameters:
purpose- namespace initialization or ordinary updatesnapshot- the complete read setmutations- the bounded change settemporalCondition- engine-created inclusive floor and optional exclusive expiry- Returns:
- the validated write
- Since:
- 1.0.0
-
getCredentialNamespace
Returns the authoritative namespace.- Returns:
- the namespace
- Since:
- 1.0.0
-
getRecoveryEpoch
Returns the recovery epoch that must be checked within the commit transaction.- Returns:
- the epoch
- Since:
- 1.0.0
-
getPurpose
Returns initialization or update purpose.- Returns:
- the purpose
- Since:
- 1.0.0
-
getSnapshot
Returns every exact version and absence predicate.- Returns:
- the snapshot
- Since:
- 1.0.0
-
getMutations
Returns the immutable mutation list.- Returns:
- the mutations
- Since:
- 1.0.0
-
getTemporalCondition
Returns the original temporal condition to validate under the final transaction locks.- Returns:
- the exact inclusive floor and optional exclusive expiry
- Since:
- 1.0.0
-
toString
-