RetentionScheduler class final
Runs a RetentionService sweep on a fixed interval.
start is a no-op when the interval is zero (the deployment relies on the
/maintenance/cleanup endpoint instead). onSweep receives each report,
for logging.
Constructors
- RetentionScheduler(RetentionService service, {required Duration interval, void onSweep(RetentionReport report)?})
-
Creates a scheduler for
servicefiring everyinterval.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- interval → Duration
-
How often to sweep; Duration.zero disables the timer.
final
- onSweep → void Function(RetentionReport report)?
-
Called with each sweep's report (for logging), if set.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- service → RetentionService
-
The retention service to run.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → void - Starts the periodic timer (no-op when interval is zero or already running).
-
stop(
) → void - Stops the timer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited