Packages

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. Protected

Instance Constructors

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def attach(ob: Option[AnyRef])(implicit trace: Trace): UIO[Option[AnyRef]]
  6. final def attachment(implicit trace: Trace): UIO[Option[AnyRef]]
  7. final def cancel(implicit trace: Trace): UIO[Unit]
  8. def channel: SelectableChannel
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(obj: Any): Boolean
    Definition Classes
    SelectionKey → AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    SelectionKey → AnyRef → Any
  15. final def interestOps(ops: Set[Operation])(implicit trace: Trace): UIO[Unit]
  16. final def interestOps(implicit trace: Trace): UIO[Set[Operation]]
  17. def interested(op: Operation)(implicit trace: Trace): UIO[Set[Operation]]
  18. final def isAcceptable(implicit trace: Trace): UIO[Boolean]
  19. final def isConnectable(implicit trace: Trace): UIO[Boolean]
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def isReadable(implicit trace: Trace): UIO[Boolean]
  22. final def isValid(implicit trace: Trace): UIO[Boolean]
  23. final def isWritable(implicit trace: Trace): UIO[Boolean]
  24. def matchChannel[R, E, A](matcher: (Set[Operation]) => PartialFunction[SelectableChannel, ZIO[R, E, A]])(implicit trace: Trace): ZIO[R, E, A]

    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 =>
            ZIO.when(readyOps(Operation.Read)) {
              // use `channel` to read
            } *>
              ZIO.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
    Definition Classes
    AnyRef
  26. def notInterested(op: Operation)(implicit trace: Trace): UIO[Set[Operation]]
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def readyOps(implicit trace: Trace): UIO[Set[Operation]]
  30. final def selector: Selector
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    SelectionKey → AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped