package kafka.utils
trait Scheduler {
def isStarted: Boolean
def shutdown()
def schedule(
name: String,
fun: () => Unit,
delay: Long = 0,
period: Long = -1,
unit: TimeUnit = TimeUnit.MILLISECONDS)
def startup()
}
Scheduler Contract
Scheduler
is the contract of task schedulers that allow for scheduling tasks.
Note
|
Kafka Server and Periodic Tasks describes the scheduled tasks. |
Property | Description |
---|---|
|
Used when:
|
|
Shuts down the scheduler. When this method is complete no more executions of background tasks will occur. Used when:
|
|
Used when:
|
|
Used when:
|
Note
|
KafkaScheduler is the one and only known implementation of the Scheduler Contract in Apache Kafka. |