TimerImpl

cc.otavia.core.timer.TimerImpl
final class TimerImpl(val system: ActorSystem) extends Timer

Default implementation of Timer

Attributes

Graph
Supertypes
trait Timer
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override 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

Definition Classes
override 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

Definition Classes
override 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

Definition Classes
override 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

Definition Classes

Inherited methods

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

Attributes

Inherited from:
Timer