Class LeaderFollowersThreadPool

    • Field Detail

      • DEFAULT_THREADPOOL_SIZE

        public static final int DEFAULT_THREADPOOL_SIZE
        Default thread pool size.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LeaderFollowersThreadPool

        public LeaderFollowersThreadPool()
        Constructor.
    • Method Detail

      • promoteLeader

        public void promoteLeader​(Runnable task)
        Promote a new leader.
        Parameters:
        task - task to execute by a new leader.
      • execute

        public void execute​(Runnable task)
        Execute given task.
        Parameters:
        task - task to execute.
      • shutdown

        public void shutdown()
        Shutdown.