Class/Object

zio.nio.channels

SelectionKey

Related Docs: object SelectionKey | package channels

Permalink

final class SelectionKey extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SelectionKey
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SelectionKey(selectionKey: java.nio.channels.SelectionKey)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. final def attach(ob: Option[AnyRef])(implicit trace: ZTraceElement): UIO[Option[AnyRef]]

    Permalink
  6. final def attachment(implicit trace: ZTraceElement): UIO[Option[AnyRef]]

    Permalink
  7. final def cancel(implicit trace: ZTraceElement): UIO[Unit]

    Permalink
  8. def channel: SelectableChannel

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    SelectionKey → AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    SelectionKey → AnyRef → Any
  15. final def interestOps(ops: Set[Operation])(implicit trace: ZTraceElement): UIO[Unit]

    Permalink
  16. final def interestOps(implicit trace: ZTraceElement): UIO[Set[Operation]]

    Permalink
  17. def interested(op: Operation)(implicit trace: ZTraceElement): UIO[Set[Operation]]

    Permalink
  18. final def isAcceptable(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink
  19. final def isConnectable(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def isReadable(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink
  22. final def isValid(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink
  23. final def isWritable(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink
  24. def matchChannel[R, E, A](matcher: (Set[Operation]) ⇒ PartialFunction[SelectableChannel, ZIO[R, E, A]])(implicit trace: ZTraceElement): ZIO[R, E, A]

    Permalink

    Convenience method for processing keys from the selected key set.

    Convenience method for processing keys from the selected key set.

    Pattern matching on the channel type avoids the need for potentially unsafe casting to the channel type you expect.

    If a channel type is selected that does not match the pattern match supplied then a defect is raised.

    Usage:

    for {
      _ <- selector.select
      _ <- selector.foreachSelectedKey { key =>
        key.matchChannel { readyOps => {
          case channel: ServerSocketChannel if readyOps(Operation.Accept) =>
            // use `channel` to accept connection
          case channel: SocketChannel =>
            IO.when(readyOps(Operation.Read)) {
              // use `channel` to read
            } *>
              IO.when(readyOps(Operation.Write)) {
                // use `channel` to write
              }
        } }
      }
    } yield ()
    matcher

    Function that is passed the ready operations set, and must return a partial function that handles whatever channel types are registered with the selector.

    returns

    The effect value returned by matcher, or a defect value if matcher did not match the selected channel.

  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def notInterested(op: Operation)(implicit trace: ZTraceElement): UIO[Set[Operation]]

    Permalink
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def readyOps(implicit trace: ZTraceElement): UIO[Set[Operation]]

    Permalink
  30. final def selector: Selector

    Permalink
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    SelectionKey → AnyRef → Any
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped