class ActorSelectorManager : SelectorManagerSupport, Closeable, CoroutineScope
Default CIO selector manager implementation
ActorSelectorManager(context: <ERROR CLASS>)
Default CIO selector manager implementation |
val coroutineContext: <ERROR CLASS> |
var cancelled: Int
Number of cancelled keys |
|
var pending: Int
Number of pending selectables |
|
val provider: SelectorProvider
NIO selector provider |
fun close(): Unit
Close selector manager and release all resources |
|
fun notifyClosed(s: Selectable): Unit
Notifies the selector that selectable has been closed. |
|
fun publishInterest(selectable: Selectable): Unit
Publish current selectable interest |
fun applyInterest(selector: Selector, s: Selectable): Unit
Applies selectable's current interest (should be invoked in selection thread) |
|
fun cancelAllSuspensions(attachment: Selectable, t: Throwable): Unit
Cancel all selectable's suspensions with the specified exception fun cancelAllSuspensions(selector: Selector, t: Throwable?): Unit
Cancel all suspensions with the specified exception, reset all interests |
|
fun handleSelectedKey(key: SelectionKey): Unit
Handles particular selected key |
|
fun handleSelectedKeys(selectedKeys: MutableSet<SelectionKey>, keys: Set<SelectionKey>): Unit
Handle selected keys clearing selectedKeys set |
|
fun notifyClosedImpl(selector: Selector, key: SelectionKey, attachment: Selectable): Unit
Notify selectable's closure |
|
suspend fun select(selectable: Selectable, interest: SelectInterest): Unit
Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created. |
fun <C, R> SelectorManager.buildOrClose(create: SelectorProvider.() -> C, setup: C.() -> R): R
Creates a NIO entity via create and calls setup on it. If any exception happens then the entity will be closed and an exception will be propagated. |