Used for recover failed instances
Used for recover failed instances
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") }
copy conection from previous instance when transputer is restarted.
copy conection from previous instance when transputer is restarted.
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
set failure limit.
set failure limit. (when number of failures during windowsDuration is bigger than maxFailures, TooManyFailures exception is escalated to parent transputer.
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.
configure loop in selector
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}" }
called when failure is escalated.
called when failure is escalated.
called when transducer is restarted.
called when transducer is restarted.
- previous (i.e. failed) instance of trnasputer.
called when transducer is choose to resume durign recovery.
called when transducer is choose to resume durign recovery.
called when transducer is started.
called when transducer is started.
called when transputer is stopped.
called when transputer is stopped.
set recover function
set recover function
append recover function to existing
append recover function to existing
return replica number of current instance, if transponder run replicated.
return replica number of current instance, if transponder run replicated.
Transputer, where dehaviour can be described by selector function