Interface CompactionStrategy

All Known Implementing Classes:
WindowCompactionStrategy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CompactionStrategy
Decides what leaves a session's active view. A strategy is policy, not storage: given the view it says which events leave it (covered), which stay at its front (pinned), which recent events are kept verbatim (preserved), and what summary stands in for the covered ones; it never writes. SessionService.compact(java.lang.String, org.springframework.ai.session.compaction.CompactionTrigger, org.springframework.ai.session.compaction.CompactionStrategy) records the decision by appending a CompactionBoundary event and the summary events.
Since:
2.1.0
Author:
Christian Tzolov