public SelectorManager
Selector manager is a service that manages NIO selectors and selection threads
| Modifier and Type | Interface and Description |
|---|---|
static class |
SelectorManager.Companion |
| Modifier and Type | Field and Description |
|---|---|
static SelectorManager.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
java.nio.channels.spi.SelectorProvider |
getProvider()
NIO selector provider
|
void |
notifyClosed(Selectable s)
Notifies the selector that selectable has been closed.
|
java.lang.Object |
select(Selectable selectable,
SelectInterest interest,
kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Suspends until interest is selected for selectable
May cause manager to allocate and run selector instance if not yet created.
|
static SelectorManager.Companion Companion
java.nio.channels.spi.SelectorProvider getProvider()
NIO selector provider
void notifyClosed(Selectable s)
Notifies the selector that selectable has been closed.
java.lang.Object select(Selectable selectable, SelectInterest interest, kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created.
Only one selection is allowed per interest per selectable but you can select for different interests for the same selectable simultaneously. In other words you can select for read and write at the same time but should never try to read twice for the same selectable.