Class FsHistoryPolicy
java.lang.Object
zeroecho.pki.impl.fs.FsHistoryPolicy
History configuration for mutable entities stored by
FilesystemPkiStore.
"Mutable" here means: the entity may be replaced/updated over time, but every
replacement must remain audit-able. This implementation achieves that by
writing an immutable history record (append-only) and then updating
current.bin atomically.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported cleanup strategy. -
Method Summary
Modifier and TypeMethodDescriptionCleanup strategy.static FsHistoryPolicydisabled()Disables history tracking.booleanenabled()Whether history is enabled.static FsHistoryPolicyCreates a history policy withFsHistoryPolicy.CleanupStrategy.ON_WRITE.Optional retention window.
-
Method Details
-
onWrite
Creates a history policy withFsHistoryPolicy.CleanupStrategy.ON_WRITE.- Parameters:
retentionWindow- optional retention window; when present, entries older thannow - retentionWindoware deleted during writes (best-effort, deterministic order)- Returns:
- policy
-
disabled
Disables history tracking.Disabling history implies that updates to the entity are still atomic, but audit reconstruction and snapshot export may be limited or impossible.
- Returns:
- policy
-
enabled
public boolean enabled()Whether history is enabled.- Returns:
- true if enabled
-
cleanupStrategy
-
retentionWindow
-