public class SelectorManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
REACTOR_ATTRIBUTE |
Constructor and Description |
---|
SelectorManager(int selectorPoolSize,
NioController controller,
Configuration conf) |
Modifier and Type | Method and Description |
---|---|
NioController |
getController() |
Reactor |
getReactorByIndex(int index)
Find reactor by index
|
int |
getSelectorCount() |
boolean |
isStarted() |
Reactor |
nextReactor()
Get next reactor
|
Reactor |
registerChannel(SelectableChannel channel,
int ops,
Object attachment)
Register channel
|
void |
registerSession(Session session,
EventType event)
Register session
|
void |
start() |
void |
stop() |
public static final String REACTOR_ATTRIBUTE
public SelectorManager(int selectorPoolSize, NioController controller, Configuration conf) throws IOException
IOException
public int getSelectorCount()
public void start()
public Reactor getReactorByIndex(int index)
index
- public void stop()
public final Reactor registerChannel(SelectableChannel channel, int ops, Object attachment)
channel
- ops
- attachment
- public final Reactor nextReactor()
public final void registerSession(Session session, EventType event)
session
- event
- public NioController getController()
public final boolean isStarted()
Copyright © 2021. All rights reserved.