Class LeaderFollowersHandler

  • All Implemented Interfaces:
    java.lang.Runnable, ReactorHandler

    public class LeaderFollowersHandler
    extends java.lang.Object
    implements ReactorHandler, java.lang.Runnable
    Decorator pattern to 'decorate' application-specific event processing handler to work with Leader/Followers deisgn pattern. This decorator promotes a new leader thread and disables/enables the handler.
    • Constructor Detail

      • LeaderFollowersHandler

        public LeaderFollowersHandler​(Reactor reactor,
                                      ReactorHandler handler,
                                      LeaderFollowersThreadPool threadPool)
        Constructor.
        Parameters:
        reactor - reactor to handle.
        handler - application-specific event processing handler.
        threadPool - leader-followers thread pool.