Trait

gopher

SelectTransputer

Related Doc: package gopher

Permalink

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

Type Members

  1. class InPort[A] extends Input[A]

    Permalink
    Definition Classes
    Transputer
  2. class OutPort[A] extends Output[A]

    Permalink
    Definition Classes
    Transputer
  3. type timeout = FiniteDuration

    Permalink
    Definition Classes
    SelectorBuilder

Abstract Value Members

  1. abstract def api: GopherAPI

    Permalink
    Definition Classes
    Transputer
  2. abstract def recoverFactory: () ⇒ Transputer

    Permalink

    Used for recover failed instances

    Used for recover failed instances

    Definition Classes
    Transputer

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(p: Transputer): ParTransputer

    Permalink
    Definition Classes
    Transputer
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. object InPort

    Permalink
    Definition Classes
    Transputer
  6. object OutPort

    Permalink
    Definition Classes
    Transputer
  7. macro def apply(f: PartialFunction[Any, Unit]): Future[Unit]

    Permalink

    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
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def copyPorts(prev: Transputer): Unit

    Permalink

    copy conection from previous instance when transputer is restarted.

    copy conection from previous instance when transputer is restarted.

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

    Permalink

    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
  12. implicit def ec: ExecutionContext

    Permalink
    Definition Classes
    SelectorBuilder
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def failureLimit(maxFailures: Int = recoveryLimits.maxFailures, windowDuration: Duration = recoveryLimits.windowDuration): SelectTransputer.this.type

    Permalink

    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
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. macro def foreach(f: (Any) ⇒ Unit): Unit

    Permalink

    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
  18. def futureInput[A](f: Future[A]): FutureInput[A]

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def go: Future[Unit]

    Permalink
    Definition Classes
    SelectorBuilder
  21. def goOnce: Future[Unit]

    Permalink
    Definition Classes
    SelectTransputerTransputer
  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. macro def idle(body: Unit): ForeverSelectorBuilder

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  24. macro def input[B](f: PartialFunction[Any, B]): Input[B]

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  25. def inputBuilder[B](): InputSelectorBuilder[B]

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. implicit def logSource: LogSource[Transputer]

    Permalink
    Definition Classes
    Transputer
  28. macro def loop(f: PartialFunction[Any, Unit]): Unit

    Permalink

    configure loop in selector

  29. macro def map[B](f: (Any) ⇒ B): Input[B]

    Permalink

    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
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  33. def onEscalatedFailure(ex: Throwable): Unit

    Permalink

    called when failure is escalated.

    called when failure is escalated.

    Attributes
    protected
    Definition Classes
    SelectTransputerTransputer
  34. def onIdle(arg: SkipSelectorArgument[Unit]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  35. def onRead[E](ch: Input[E])(arg: ReadSelectorArgument[E, Unit]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  36. def onRestart(prev: Transputer): Unit

    Permalink

    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

    Permalink

    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

    Permalink

    called when transducer is started.

    called when transducer is started.

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

    Permalink

    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

    Permalink
    Definition Classes
    SelectorBuilder
  41. def onWrite[E](ch: Output[E])(arg: WriteSelectorArgument[E, Unit]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
  42. macro def reading[A](ch: Input[A])(f: (A) ⇒ Unit): ForeverSelectorBuilder

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  43. def readingWithFlowTerminationAsync[A](ch: Input[A], f: (ExecutionContext, FlowTermination[Unit], A) ⇒ Future[Unit]): SelectTransputer.this.type

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  44. def recover(f: PartialFunction[Throwable, Directive]): SelectTransputer.this.type

    Permalink

    set recover function

    set recover function

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

    Permalink

    append recover function to existing

    append recover function to existing

    Definition Classes
    Transputer
  46. def replica: Int

    Permalink

    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. var selectorInit: () ⇒ Unit

    Permalink
    Attributes
    protected
  48. def selectorRun: Future[Unit]

    Permalink
    Definition Classes
    SelectorBuilder
  49. def start(): Future[Unit]

    Permalink
    Definition Classes
    Transputer
  50. def stop(): Unit

    Permalink
    Definition Classes
    SelectTransputerTransputer
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  52. macro def timeout(t: FiniteDuration)(f: (FiniteDuration) ⇒ Unit): ForeverSelectorBuilder

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  53. def timeoutWithFlowTerminationAsync(t: FiniteDuration, f: (ExecutionContext, FlowTermination[Unit], FiniteDuration) ⇒ Future[Unit]): SelectTransputer.this.type

    Permalink
    Definition Classes
    ForeverSelectorBuilder
    Annotations
    @inline()
  54. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def withIdle(f: (Skip[Unit]) ⇒ Option[Future[Continuated[Unit]]]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  59. def withReader[B](ch: Input[B], f: (ContRead[B, Unit]) ⇒ Option[(In[B]) ⇒ Future[Continuated[Unit]]]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  60. def withTimeout(t: FiniteDuration)(f: (Skip[Unit]) ⇒ Option[Future[Continuated[Unit]]]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  61. def withWriter[B](ch: Output[B], f: (ContWrite[B, Unit]) ⇒ Option[(B, Future[Continuated[Unit]])]): SelectTransputer.this.type

    Permalink
    Definition Classes
    SelectorBuilder
    Annotations
    @inline()
  62. macro def writing[A](ch: Output[A], x: A)(f: (A) ⇒ Unit): ForeverSelectorBuilder

    Permalink
    Definition Classes
    ForeverSelectorBuilder
  63. def writingWithFlowTerminationAsync[A](ch: Output[A], x: ⇒ A, f: (ExecutionContext, FlowTermination[Unit], A) ⇒ Future[Unit]): ForeverSelectorBuilder

    Permalink
    Definition Classes
    ForeverSelectorBuilder
    Annotations
    @inline()

Inherited from Transputer

Inherited from ForeverSelectorBuilder

Inherited from SelectorBuilder[Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped