How much of a thread's history Checkpointer.prune keeps, by age or by size. Every limit is optional, and one that is not set removes nothing, so RetentionPolicy() keeps everything.
maxAge: a checkpoint created more thanmaxAgeago, and an event recorded more thanmaxAgeago, is removed - by the store's clock, against the checkpoint'screatedAtand the event'stimestamp.maxCheckpoints: only the newestmaxCheckpointscheckpoints are kept.maxEvents: only the newestmaxEventsevents are kept.
Whatever the limits, the thread's latest checkpoint and its pending writes are never removed, so pruning never changes what start, recover or resume does next. Pruning a checkpoint also removes the events recorded before the oldest checkpoint kept; maxAge and maxEvents may remove more events than that, including the latest checkpoint's. Removing events raises the thread's replay floor exactly as Checkpointer.compactEvents does (GraphError.ReplayUnavailable).
apply and the with* setters throw IllegalArgumentException for a non-positive maxAge or maxCheckpoints, or a negative maxEvents; RetentionPolicy.of returns a ValidationError.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any