Package-level declarations

Types

Link copied to clipboard
abstract class VitalCountdownTask<P, R : Runnable, T>(val plugin: P) : VitalHasInfo

Defines a countdown task within the Vital framework. A countdown task may perform an action that can end after a set countdown.

Link copied to clipboard
abstract class VitalRepeatableTask<P, R : Runnable, T>(val plugin: P) : VitalHasInfo

Defines a repeatable task within the Vital framework. A task may perform repeated actions with a set interval.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class VitalScheduled(val initialDelay: Long = 0, val initialDelayString: String = "", val fixedDelay: Long = 0, val fixedDelayString: String = "", val timeUnit: TimeUnit = TimeUnit.MILLISECONDS, val timeUnitString: String = "")

Convenience-annotation to mark functions as schedulers to be managed by the internal VitalScheduler. It is recommended to use this annotation for frequent jobs that should run blocking to each-other (not the main thread). To schedule "normal" business-level tasks, use Spring's Scheduled annotation.

Link copied to clipboard
abstract class VitalScheduler(val environment: Environment) : BeanPostProcessor

Internal class; used to define a custom schedular to schedule tasks on the server's schedular instead of the one from Spring. This schedular can schedule functions annotated with VitalScheduled.

Link copied to clipboard
@EnableScheduling
class VitalTasksModule(vitalRepeatableTasks: List<VitalRepeatableTask<*, *, *>>, vitalCountdownTasks: List<VitalCountdownTask<*, *, *>>, vitalScheduler: VitalScheduler) : VitalModule