NioHandler

cc.otavia.core.transport.reactor.nio.NioHandler
See theNioHandler companion object
final class NioHandler(val selectorProvider: SelectorProvider, val selectStrategy: SelectStrategy, sys: ActorSystem) extends IoHandler

Attributes

Companion
object
Graph
Supertypes
class IoHandler
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(system: ActorSystem)

Concrete methods

override def bind(channel: AbstractChannel, local: SocketAddress): Unit

Attributes

Definition Classes
override def close(channel: AbstractChannel): Unit

Attributes

Definition Classes
override def connect(channel: AbstractChannel, remote: SocketAddress, local: Option[SocketAddress], fastOpen: Boolean): Unit

Attributes

Definition Classes
override def deregister(channel: AbstractChannel): Unit

Deregister a AbstractChannel for IO.

Deregister a AbstractChannel for IO.

Value parameters

channel

the AbstractChannel to deregister..

Attributes

Throws
Exception

thrown if an error happens during deregistration.

Definition Classes
override def destroy(): Unit

Destroy the IoHandler and free all its resources.

Destroy the IoHandler and free all its resources.

Attributes

Definition Classes
override def disconnect(channel: AbstractChannel): Unit

Attributes

Definition Classes
override def flush(channel: AbstractChannel, payload: FileRegion | RecyclablePageBuffer): Unit

Attributes

Definition Classes
override def isCompatible(handleType: Class[_ <: AbstractChannel]): Boolean

Returns true if the given type is compatible with this IoHandler and so can be registered, false otherwise.

Returns true if the given type is compatible with this IoHandler and so can be registered, false otherwise.

Value parameters

handleType

the type of the AbstractChannel.

Attributes

Returns

if compatible of not.

Definition Classes
override def open(channel: AbstractChannel, path: Path, options: Seq[OpenOption], attrs: Seq[FileAttribute[_]]): Unit

Attributes

Definition Classes
override def prepareToDestroy(): Unit

Prepare to destroy this IoHandler. This method will be called before destroy and may be called multiple times.

Prepare to destroy this IoHandler. This method will be called before destroy and may be called multiple times.

Attributes

Definition Classes
override def read(channel: AbstractChannel, plan: ReadPlan): Unit

Attributes

Definition Classes
override def register(channel: AbstractChannel): Unit

Register a AbstractChannel for IO.

Register a AbstractChannel for IO.

Value parameters

channel

the AbstractChannel to register.

Attributes

Definition Classes
override def run(context: IoExecutionContext): Int

Run the IO handled by this IoHandler. The IoExecutionContext should be used to ensure we not execute too long and so block the processing of other task that are scheduled on the cc.otavia.core.actor.ChannelsActor . This is done by taking IoExecutionContext.delayNanos or IoExecutionContext.deadlineNanos into account.

Run the IO handled by this IoHandler. The IoExecutionContext should be used to ensure we not execute too long and so block the processing of other task that are scheduled on the cc.otavia.core.actor.ChannelsActor . This is done by taking IoExecutionContext.delayNanos or IoExecutionContext.deadlineNanos into account.

Attributes

Returns

the number of IoHandle for which I/O was handled.

Definition Classes
override def shutdown(channel: AbstractChannel, direction: ChannelShutdownDirection): Unit

Attributes

Definition Classes
override def wakeup(): Unit

Wakeup the IoHandler, which means if any operation blocks it should be unblocked and return as soon as possible.

Wakeup the IoHandler, which means if any operation blocks it should be unblocked and return as soon as possible.

Attributes

Definition Classes

Concrete fields

val selectorProvider: SelectorProvider

Inherited fields

Attributes

Inherited from:
IoHandler