Interface MutexTask


  • public interface MutexTask
    The MutexTask interface should be implemented by any class whose instances distributed across controllers are intended to be executed in a mutually exclusive fashion.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void start()
      Begins the execution of a mutually exclusive task.
      void stop()
      This method will be called when exclusivity of task execution can no longer be guaranteed.
    • Method Detail

      • start

        void start()
        Begins the execution of a mutually exclusive task. The start method will be called once the "lock" is acquired. After the start method returns the lock is released and some other instance can take over execution.
      • stop

        void stop()
        This method will be called when exclusivity of task execution can no longer be guaranteed. The implementation should take necessary steps to halt task execution in order to ensure correctness.