public class LeaderFollowersHandler extends java.lang.Object implements ReactorHandler, java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected ReactorHandler |
handler
Application-specific event processing handler.
|
protected Reactor |
reactor
Reactor to serve.
|
protected LeaderFollowersThreadPool |
threadPool
Leader-followers thread pool.
|
| Constructor and Description |
|---|
LeaderFollowersHandler(Reactor reactor,
ReactorHandler handler,
LeaderFollowersThreadPool threadPool)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleEvent(java.nio.channels.SelectionKey key)
Process request of given
SelectionKey. |
void |
run() |
protected final Reactor reactor
protected final ReactorHandler handler
protected final LeaderFollowersThreadPool threadPool
public LeaderFollowersHandler(Reactor reactor, ReactorHandler handler, LeaderFollowersThreadPool threadPool)
reactor - reactor to handle.handler - application-specific event processing handler.threadPool - leader-followers thread pool.public void handleEvent(java.nio.channels.SelectionKey key)
ReactorHandlerSelectionKey.handleEvent in interface ReactorHandlerkey - key to be processed.ReactorHandler.handleEvent(java.nio.channels.SelectionKey)public void run()
run in interface java.lang.RunnableRunnable.run()