SelectorManagerSupport
abstract class SelectorManagerSupport : SelectorManager
Base class for NIO selector managers
Exceptions
class ClosedSelectorCancellationException : |
Properties
var cancelled: Int Number of cancelled keys |
|
var pending: Int Number of pending selectables |
|
val provider: SelectorProvider NIO selector provider |
Functions
fun applyInterest(selector: Selector, s: Selectable): Unit Applies selectable’s current interest (should be invoked in selection thread) |
|
fun cancelAllSuspensions( Cancel all selectable’s suspensions with the specified exception Cancel all suspensions with the specified exception, reset all interests |
|
fun handleSelectedKey(key: SelectionKey): Unit Handles particular selected key |
|
fun handleSelectedKeys( Handle selected keys clearing selectedKeys set |
|
fun notifyClosedImpl( Notify selectable’s closure |
|
abstract fun publishInterest(selectable: Selectable): Unit Publish current selectable interest, any thread |
|
suspend fun select( Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created. |
Inherited Functions
abstract fun notifyClosed(s: Selectable): Unit Notifies the selector that selectable has been closed. |
Extension Functions
fun <C : Closeable, R> SelectorManager.buildOrClose( 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. |
Inheritors
class ActorSelectorManager : Default CIO selector manager implementation |