EarlyBirdExecutor

class EarlyBirdExecutor(period: Long)

早鸟(早起的鸟儿有虫吃)执行器, 在对应的时间周期内,只执行第一个提交的任务

Constructors

EarlyBirdExecutor
Link copied to clipboard
fun EarlyBirdExecutor(period: Long)

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
submit
Link copied to clipboard
fun submit(task: KRunnable): Boolean
提交任务 如果被执行,返回true,否则视为被丢弃,返回false
toString
Link copied to clipboard
open fun toString(): String

Properties

lastWonTime
Link copied to clipboard
var lastWonTime: Long = 0L
period
Link copied to clipboard
private val period: Long