Class WarnManager
-
Constructor Summary
ConstructorsConstructorDescriptionWarnManager class for managing warnings and auto-deletion of expired warnings. -
Method Summary
-
Constructor Details
-
WarnManager
public WarnManager()WarnManager class for managing warnings and auto-deletion of expired warnings.
-
-
Method Details
-
start
public void start()Starts the auto-deletion of expired warnings based on the configured interval.Note: The auto-deletion feature must be enabled in the configuration file. The interval for auto-deletion can be configured in the configuration file using the properties 'warns.autodelete.use' and 'warns.autodelete.time'.
The time unit for the interval can be configured using the property 'warns.autodelete.unit'. By default, the time unit is set to 'MINUTES'. The available time units are: - NANOSECONDS - MICROSECONDS - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS
-
stop
public void stop()Stops the execution of the scheduler and shuts it down gracefully. If the scheduler does not terminate within 5 seconds, it will be forced to shut down. If an InterruptedException occurs during the termination process, the scheduler will be forced to shut down as well.
-