Packages

t

gopher

SelectTransputer

trait SelectTransputer extends ForeverSelectorBuilder with Transputer

Transputer, where dehaviour can be described by selector function

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SelectTransputer
  2. Transputer
  3. ForeverSelectorBuilder
  4. SelectorBuilder
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type timeout = FiniteDuration
    Definition Classes
    SelectorBuilder
  2. class InPort[A] extends Input[A]
    Definition Classes
    Transputer
  3. class OutPort[A] extends Output[A]
    Definition Classes
    Transputer

Abstract Value Members

  1. abstract def api: GopherAPI
    Definition Classes
    Transputer
  2. abstract def recoverFactory: () => Transputer

    Used for recover failed instances

    Used for recover failed instances

    Definition Classes
    Transputer

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(p: Transputer): ParTransputer
    Definition Classes
    Transputer
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. macro def apply(f: PartialFunction[Any, Unit]): Future[Unit]

    provide syntax for running select loop as async operation.

    provide syntax for running select loop as async operation.

    val receiver = gopherApi.select.forever{
                     case x: channel.read => Console.println(s"received:$x")
                   }
    Definition Classes
    ForeverSelectorBuilder
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def copyPorts(prev: Transputer): Unit

    copy conection from previous instance when transputer is restarted.

    copy conection from previous instance when transputer is restarted.

    Definition Classes
    Transputer
  9. def copyState(prev: Transputer): Unit

    copyState from previous instance when transputer is restarted.

    copyState from previous instance when transputer is restarted. can be overriden in subclasses (by default: do nothing)

    Note, that port connection is restored before call of copyState

    Definition Classes
    Transputer
  10. implicit def ec: ExecutionContext
    Definition Classes
    SelectorBuilder
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def failureLimit(maxFailures: Int = recoveryLimits.maxFailures, windowDuration: Duration = recoveryLimits.windowDuration): SelectTransputer.this.type

    set failure limit.

    set failure limit. (when number of failures during windowsDuration is bigger than maxFailures, TooManyFailures exception is escalated to parent transputer.

    Definition Classes
    Transputer
  14. macro def foreach(f: (Any) => Unit): Unit

    provide syntax for running select loop inside go (or async) block example of usage:

    provide syntax for running select loop inside go (or async) block example of usage:

    go {
      .....
      for(s <- gopherApi.select.forever)
        s match {
          case x: ch1.read => do something with x
          case q: chq.read => implicitly[FlowTermination[Unit]].doExit(())
          case y: ch2.write if (y=expr) => do something with y
          case _ => do somethig when idle.
        }

    Note, that you can use implicit instance of [FlowTermination[Unit]] to stop loop.

    Definition Classes
    ForeverSelectorBuilder
  15. def futureInput[A](f: Future[A]): FutureInput[A]
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def go: Future[Unit]
    Definition Classes
    SelectorBuilder
  18. def goOnce: Future[Unit]
    Definition Classes
    SelectTransputerTransputer
  19. macro def handleError(f: (Throwable) => Unit): ForeverSelectorBuilder
    Definition Classes
    ForeverSelectorBuilder
  20. def handleErrorWithFlowTerminationAsync(f: (ExecutionContext, FlowTermination[Unit], Continuated[Unit], Throwable) => Future[Unit]): SelectTransputer.this.type
    Definition Classes
    ForeverSelectorBuilder
    Annotations
    @inline()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. macro def idle(body: Unit): ForeverSelectorBuilder
    Definition Classes
    ForeverSelectorBuilder
  23. macro def input[B](f: PartialFunction[Any, B]): Input[B]
    Definition Classes
    ForeverSelectorBuilder
  24. def inputBuilder[B](): InputSelectorBuilder[B]
    Definition Classes
    ForeverSelectorBuilder
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. implicit def logSource: LogSource[Transputer]
    Definition Classes
    Transputer
  27. macro def loop(f: PartialFunction[Any, Unit]): Unit

    configure loop in selector

  28. macro def map[B](f: (Any) => B): Input[B]

    provide syntax for creating output channels.

    provide syntax for creating output channels.

    val multiplexed = for(s <- gopherApi.select.forever) yield
         s match {
            case x: channelA => s"A:${x}"
            case x: channelB => s"B:${x}"
         }
    Definition Classes
    ForeverSelectorBuilder
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. def onError(arg: ErrorSelectorArgument[Unit]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
  33. def onEscalatedFailure(ex: Throwable): Unit

    called when failure is escalated.

    called when failure is escalated.

    Attributes
    protected
    Definition Classes
    SelectTransputerTransputer
  34. def onIdle(arg: SkipSelectorArgument[Unit]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
  35. def onRead[E](ch: Input[E])(arg: ReadSelectorArgument[E, Unit]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
  36. def onRestart(prev: Transputer): Unit

    called when transducer is restarted.

    called when transducer is restarted.

    prev

    - previous (i.e. failed) instance of trnasputer.

    Attributes
    protected
    Definition Classes
    Transputer
  37. def onResume(): Unit

    called when transducer is choose to resume durign recovery.

    called when transducer is choose to resume durign recovery.

    Attributes
    protected
    Definition Classes
    Transputer
  38. def onStart(): Unit

    called when transducer is started.

    called when transducer is started.

    Attributes
    protected
    Definition Classes
    Transputer
  39. def onStop(): Unit

    called when transputer is stopped.

    called when transputer is stopped.

    Attributes
    protected
    Definition Classes
    SelectTransputerTransputer
  40. def onTimeout(t: FiniteDuration)(arg: SkipSelectorArgument[Unit]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
  41. def onWrite[E](ch: Output[E])(arg: WriteSelectorArgument[E, Unit]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
  42. macro def reading[A](ch: Input[A])(f: (A) => Unit): ForeverSelectorBuilder
    Definition Classes
    ForeverSelectorBuilder
  43. def readingWithFlowTerminationAsync[A](ch: Input[A], f: (ExecutionContext, FlowTermination[Unit], A) => Future[Unit]): SelectTransputer.this.type
    Definition Classes
    ForeverSelectorBuilder
  44. def recover(f: PartialFunction[Throwable, Directive]): SelectTransputer.this.type

    set recover function

    set recover function

    Definition Classes
    Transputer
  45. def recoverAppend(f: PartialFunction[Throwable, Directive]): SelectTransputer.this.type

    append recover function to existing

    append recover function to existing

    Definition Classes
    Transputer
  46. def replica: Int

    return replica number of current instance, if transponder run replicated.

    return replica number of current instance, if transponder run replicated.

    Attributes
    protected
    Definition Classes
    Transputer
  47. val selectorInit: () => Unit
    Attributes
    protected
  48. def selectorRun: Future[Unit]
    Definition Classes
    SelectorBuilder
  49. def start(): Future[Unit]
    Definition Classes
    Transputer
  50. def stop(): Unit
    Definition Classes
    SelectTransputerTransputer
  51. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  52. macro def timeout(t: FiniteDuration)(f: (FiniteDuration) => Unit): ForeverSelectorBuilder
    Definition Classes
    ForeverSelectorBuilder
  53. def timeoutWithFlowTerminationAsync(t: FiniteDuration, f: (ExecutionContext, FlowTermination[Unit], FiniteDuration) => Future[Unit]): SelectTransputer.this.type
    Definition Classes
    ForeverSelectorBuilder
    Annotations
    @inline()
  54. def toString(): String
    Definition Classes
    AnyRef → Any
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. def withError(f: (ExecutionContext, FlowTermination[Unit], Continuated[Unit], Throwable) => Future[Continuated[Unit]]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  59. def withIdle(f: (Skip[Unit]) => Option[Future[Continuated[Unit]]]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  60. def withReader[B](ch: Input[B], f: (ContRead[B, Unit]) => Option[(In[B]) => Future[Continuated[Unit]]]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  61. def withTimeout(t: FiniteDuration)(f: (Skip[Unit]) => Option[Future[Continuated[Unit]]]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  62. def withWriter[B](ch: Output[B], f: (ContWrite[B, Unit]) => Option[(B, Future[Continuated[Unit]])]): SelectTransputer.this.type
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  63. macro def writing[A](ch: Output[A], x: A)(f: (A) => Unit): ForeverSelectorBuilder
    Definition Classes
    ForeverSelectorBuilder
  64. def writingWithFlowTerminationAsync[A](ch: Output[A], x: => A, f: (ExecutionContext, FlowTermination[Unit], A) => Future[Unit]): ForeverSelectorBuilder
    Definition Classes
    ForeverSelectorBuilder
    Annotations
    @inline()
  65. object InPort
    Definition Classes
    Transputer
  66. object OutPort
    Definition Classes
    Transputer

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Transputer

Inherited from ForeverSelectorBuilder

Inherited from SelectorBuilder[Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped