Interface ActorSubscription

All Known Subinterfaces:
TimerSubscription
All Known Implementing Classes:
ActorConditionImpl, ActorFutureSubscription, DelayedTimerSubscription, StampedTimerSubscription

public interface ActorSubscription
Subscription to some external source of work / jobs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    called by the ActorThread after poll() returned true to get the job to be run
    boolean
    Returns true in case the subscription is recurring (ie. after the job finished, the subscription is re-created
    default void
    callback received as the job returned by getJob() completes execution.
    boolean
    called by the ActorThread to determine whether the subscription has work available.
    default boolean
    returns true if the subscription should be able to trigger in the provided phase
  • Method Details

    • triggersInPhase

      default boolean triggersInPhase(ActorTask.ActorLifecyclePhase phase)
      returns true if the subscription should be able to trigger in the provided phase
    • poll

      boolean poll()
      called by the ActorThread to determine whether the subscription has work available.
    • getJob

      ActorJob getJob()
      called by the ActorThread after poll() returned true to get the job to be run
    • isRecurring

      boolean isRecurring()
      Returns true in case the subscription is recurring (ie. after the job finished, the subscription is re-created
    • onJobCompleted

      default void onJobCompleted()
      callback received as the job returned by getJob() completes execution.
    • cancel

      default void cancel()