Timer

cc.otavia.core.timer.Timer
See theTimer companion object
trait Timer

Timer can generate timeout event.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class TimerImpl

Members list

Value members

Abstract methods

def cancelTimerTask(registerId: Long): Unit

API for cc.otavia.core.actor.Actor to cancel timeout event

API for cc.otavia.core.actor.Actor to cancel timeout event

Value parameters

registerId

Register id of ReactorTimerTask to cancel.

Attributes

def registerActorTimeout(trigger: TimeoutTrigger, address: EventableAddress, attach: Option[AnyRef]): Long

API for Actor to register timeout event to Timer.

API for Actor to register timeout event to Timer.

Value parameters

address

Address of this TimeoutTrigger belong to. The timeout event of the TimeoutTrigger is send to this address.

attach

optional attachment object

trigger

Timeout event trigger.

Attributes

Returns

Register id of ReactorTimerTask, cc.otavia.core.actor.Actor can use this id to cancel this trigger by cancelTimerTask

def registerChannelTimeout(trigger: TimeoutTrigger, channel: Channel): Long

API for Channel to register timeout event to Timer.

API for Channel to register timeout event to Timer.

Value parameters

channel

Channel

trigger

Timeout event trigger.

Attributes

Returns

Register id of ReactorTimerTask, cc.otavia.core.actor.Actor can use this id to cancel this trigger by cancelTimerTask

def updateTimerTask(trigger: TimeoutTrigger, registerId: Long): Unit

Update an existed TimeoutTrigger.

Update an existed TimeoutTrigger.

Value parameters

registerId

the old register id.

trigger

The new TimeoutTrigger for update.

Attributes

Concrete methods

final def sleepStack(future: MessageFuture[TimeoutReply], delay: Long, unit: TimeUnit)(using actor: AbstractActor[_]): MessageFuture[TimeoutReply]