Class CompositeCompactionTrigger
java.lang.Object
org.springframework.ai.session.compaction.CompositeCompactionTrigger
- All Implemented Interfaces:
CompactionTrigger
Fires when any of its triggers fires. The triggers are evaluated in the order given and
the evaluation stops at the first one that fires, so list the cheaper triggers first.
- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompositeCompactionTriggeranyOf(CompactionTrigger... triggers) A trigger that fires when any of the given triggers fires, evaluating them in order up to the first one that does.booleanshouldCompact(CompactionRequest request) Whether the view should be compacted now.
-
Method Details
-
anyOf
A trigger that fires when any of the given triggers fires, evaluating them in order up to the first one that does.- Throws:
IllegalArgumentException- if no trigger is given or one of them isnull
-
shouldCompact
Description copied from interface:CompactionTriggerWhether the view should be compacted now.- Specified by:
shouldCompactin interfaceCompactionTrigger
-