예제 #1
0
 public static Behavior <T> Stopped <T>(Behavior <T> postStop) => new StoppedBehavior <T>(postStop);
예제 #2
0
 /// <summary>
 /// Wrap the given behavior with the given <see cref="SupervisorStrategy"/> for
 /// the given exception.
 /// Exceptions that are not subtypes of `Thr` will not be
 /// caught and thus lead to the termination of the actor.
 ///
 /// It is possible to specify different supervisor strategies, such as restart,
 /// resume, backoff.
 ///
 /// Example:
 /// <code>
 /// var dbConnector: Behavior[DbCommand] = ...
 ///
 /// val dbRestarts =
 ///    Behaviors.supervise(dbConnector)
 ///      .onFailure(SupervisorStrategy.restart) // handle all NonFatal exceptions
 ///
 /// val dbSpecificResumes =
 ///    Behaviors.supervise(dbConnector)
 ///      .onFailure[IndexOutOfBoundsException](SupervisorStrategy.resume) // resume for IndexOutOfBoundsException exceptions
 /// </code>
 /// </summary>
 public static Supervise <T> Supervise <T>(this Behavior <T> behavior) => new Supervise <T>(behavior);
예제 #3
0
 /// <summary>
 /// Behavior decorator that copies all received message to the designated
 /// monitor <see cref="IActorRef{T}"/> before invoking the wrapped behavior. The
 /// wrapped behavior can evolve (i.e. return different behavior) without needing to be
 /// wrapped in a `monitor` call again.
 /// </summary>
 public static Behavior <T> Monitor <T>(this Behavior <T> behavior, IActorRef <T> monitor) => throw new NotImplementedException();
예제 #4
0
 /// <summary>
 /// Create an actor in the "/system" namespace. This actor will be shut down
 /// during system.terminate only after all user actors have terminated.
 ///
 /// The returned Future of [[ActorRef]] may be converted into an [[ActorRef]]
 /// to which messages can immediately be sent by using the `ActorRef.apply`
 /// method.
 /// </summary>
 public ValueTask <IActorRef <T2> > SystemActorOf <T2>(Behavior <T2> behavior, string name, CancellationToken cancellationToken, Props props = null) where T2 : class
 {
     throw new NotImplementedException();
 }
예제 #5
0
 public IActorRef <T2> Spawn <T2>(Behavior <T2> behavior, string name, Props props = null) where T2 : class
 {
     throw new NotImplementedException();
 }
예제 #6
0
 public IActorRef <T2> SpawnAnonymous <T2>(Behavior <T2> behavior, Props props = null) where T2 : class
 {
     throw new NotImplementedException();
 }