Package akka.actor
Class TimerSchedulerImpl
- java.lang.Object
-
- akka.actor.TimerScheduler
-
- akka.actor.TimerSchedulerImpl
-
public class TimerSchedulerImpl extends TimerScheduler
INTERNAL API
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimerSchedulerImpl.InfluenceReceiveTimeoutTimerMsgstatic classTimerSchedulerImpl.InfluenceReceiveTimeoutTimerMsg$static classTimerSchedulerImpl.NotInfluenceReceiveTimeoutTimerMsgstatic classTimerSchedulerImpl.NotInfluenceReceiveTimeoutTimerMsg$static classTimerSchedulerImpl.Timerstatic classTimerSchedulerImpl.Timer$static interfaceTimerSchedulerImpl.TimerMsg
-
Constructor Summary
Constructors Constructor Description TimerSchedulerImpl(ActorContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel(java.lang.Object key)Cancel a timer with a givenkey.voidcancelAll()Cancel all timers.OptionVal<java.lang.Object>interceptTimerMsg(TimerSchedulerImpl.TimerMsg timerMsg)booleanisTimerActive(java.lang.Object key)Check if a timer with a givenkeyis active.voidstartPeriodicTimer(java.lang.Object key, java.lang.Object msg, scala.concurrent.duration.FiniteDuration interval)voidstartSingleTimer(java.lang.Object key, java.lang.Object msg, scala.concurrent.duration.FiniteDuration timeout)Start a timer that will sendmsgonce to theselfactor after the giventimeout.-
Methods inherited from class akka.actor.TimerScheduler
startPeriodicTimer, startSingleTimer
-
-
-
-
Constructor Detail
-
TimerSchedulerImpl
public TimerSchedulerImpl(ActorContext ctx)
-
-
Method Detail
-
startPeriodicTimer
public void startPeriodicTimer(java.lang.Object key, java.lang.Object msg, scala.concurrent.duration.FiniteDuration interval)- Specified by:
startPeriodicTimerin classTimerScheduler
-
startSingleTimer
public void startSingleTimer(java.lang.Object key, java.lang.Object msg, scala.concurrent.duration.FiniteDuration timeout)Description copied from class:TimerSchedulerStart a timer that will sendmsgonce to theselfactor after the giventimeout.Each timer has a key and if a new timer with same key is started the previous is cancelled and it's guaranteed that a message from the previous timer is not received, even though it might already be enqueued in the mailbox when the new timer is started.
- Specified by:
startSingleTimerin classTimerScheduler- Parameters:
key- (undocumented)msg- (undocumented)timeout- (undocumented)
-
isTimerActive
public boolean isTimerActive(java.lang.Object key)
Description copied from class:TimerSchedulerCheck if a timer with a givenkeyis active.- Specified by:
isTimerActivein classTimerScheduler- Parameters:
key- (undocumented)- Returns:
- (undocumented)
-
cancel
public void cancel(java.lang.Object key)
Description copied from class:TimerSchedulerCancel a timer with a givenkey. If canceling a timer that was already canceled, or key never was used to start a timer this operation will do nothing.It is guaranteed that a message from a canceled timer, including its previous incarnation for the same key, will not be received by the actor, even though the message might already be enqueued in the mailbox when cancel is called.
- Specified by:
cancelin classTimerScheduler- Parameters:
key- (undocumented)
-
cancelAll
public void cancelAll()
Description copied from class:TimerSchedulerCancel all timers.- Specified by:
cancelAllin classTimerScheduler
-
interceptTimerMsg
public OptionVal<java.lang.Object> interceptTimerMsg(TimerSchedulerImpl.TimerMsg timerMsg)
-
-