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

dev.forkhandles.time.executors.SimpleScheduler.kt Maven / Gradle / Ivy

package dev.forkhandles.time.executors

import java.time.Duration
import java.util.concurrent.Callable
import java.util.concurrent.Future
import java.util.concurrent.ScheduledFuture

/**
 * Simpler interface for threaded tasks.
 */
interface SimpleScheduler {
    fun  schedule(callable: Callable, delay: Duration): ScheduledFuture

    fun schedule(runnable: Runnable, delay: Duration): ScheduledFuture<*>

    fun scheduleWithFixedDelay(runnable: Runnable, initialDelay: Duration, delay: Duration): ScheduledFuture<*>

    fun scheduleAtFixedRate(runnable: Runnable, initialDelay: Duration, period: Duration): ScheduledFuture<*>

    fun shutdown()

    fun isShutdown(): Boolean

    fun submit(task: Runnable): Future<*>

    fun  submit(task: Callable): Future
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy