All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.harmonysoft.oss.common.schedule.TaskScheduler.kt Maven / Gradle / Ivy

package tech.harmonysoft.oss.common.schedule

interface TaskScheduler {

    /**
     * Schedules given tasks for the give callback
     *
     * @param tasks     new schedule to apply. All previously scheduled tasks which are not in the provided here
     *                  are automatically cancelled
     * @param callback  callback to call when it's time to execute the task
     */
    fun schedule(tasks: Collection, callback: Callback)

    fun interface Callback {

        fun onTriggered(taskId: String)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy