Class ClusterServiceCoordinator

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ClusterServiceCoordinator
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      ClusterServiceCoordinator​(java.lang.String workerId, LeaderService leaderService, java.util.function.Supplier<java.lang.Boolean> isLeader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTask​(java.lang.String taskName, long interval, java.lang.Runnable task)  
      void close()  
      void start()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClusterServiceCoordinator

        public ClusterServiceCoordinator​(java.lang.String workerId,
                                         LeaderService leaderService,
                                         java.util.function.Supplier<java.lang.Boolean> isLeader)
    • Method Detail

      • addTask

        public void addTask​(java.lang.String taskName,
                            long interval,
                            java.lang.Runnable task)
      • start

        public void start()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable