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, and an event, that the store committed more thanmaxAgeago is removed - by the store's clock, against the commit time the store recorded with it, never the checkpoint'screatedAtor the event'stimestamp: those are the producer's record, and a producer whose clock is skewed would make them too old or too young.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