public class TimerSubscription extends Object implements ActorSubscription, ScheduledTimer, Runnable
| Constructor and Description |
|---|
TimerSubscription(ActorJob job,
long deadline,
TimeUnit timeUnit,
boolean isRecurring) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
long |
getDeadline() |
ActorJob |
getJob()
called by the
ActorThread after ActorSubscription.poll() returned true to get the job to be run |
long |
getTimerId() |
TimeUnit |
getTimeUnit() |
boolean |
isRecurring()
Returns true in case the subscription is recurring (ie.
|
void |
onJobCompleted()
callback received as the job returned by
ActorSubscription.getJob() completes execution. |
void |
onTimerExpired(TimeUnit timeUnit,
long now) |
boolean |
poll()
called by the
ActorThread to determine whether the subscription has work available. |
void |
run() |
void |
setTimerId(long timerId) |
void |
submit() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittriggersInPhasepublic boolean poll()
ActorSubscriptionActorThread to determine whether the subscription has work available.poll in interface ActorSubscriptionpublic ActorJob getJob()
ActorSubscriptionActorThread after ActorSubscription.poll() returned true to get the job to be rungetJob in interface ActorSubscriptionpublic boolean isRecurring()
ActorSubscriptionisRecurring in interface ActorSubscriptionpublic void onJobCompleted()
ActorSubscriptionActorSubscription.getJob() completes execution.onJobCompleted in interface ActorSubscriptionpublic void setTimerId(long timerId)
public long getTimerId()
public void cancel()
cancel in interface ActorSubscriptioncancel in interface ScheduledTimerpublic void submit()
public long getDeadline()
public TimeUnit getTimeUnit()
public void onTimerExpired(TimeUnit timeUnit, long now)
Copyright © 2017–2019 camunda services GmbH. All rights reserved.