submitTask

abstract fun submitTask(task: Supplier<TaskAction>, executionType: ExecutionType): Task

Submits a task to be executed by the scheduler.

This is the primitive method for scheduling tasks. The task's execution depends entirely on the action returned by the given task supplier.

This is designed to allow much more fine-grained control over the execution of a task, and it is recommended that, if you wish to specify a standard delay and period, as you would with many other schedulers, that you use the provided buildTask or scheduleTask methods.

Return

the scheduled task

Parameters

task

the task to submit

executionType

the execution type of the task


abstract fun submitTask(task: Supplier<TaskAction>): Task

Submits a task to be executed by the scheduler.

This is equivalent to submitTask, except that the execution type will be chosen by the implementation.

Return

the scheduled task

Parameters

task

the task to submit