public RootGuardianSupervisor(RootActorPath root, ActorRefProvider provider, TaskCompletionSource<Status> terminationPromise, LoggingAdapter log)
 {
     _log = log;
     _terminationPromise = terminationPromise;
     _provider = provider;
     _path = root / "_Root-guardian-supervisor";   //In akka this is root / "bubble-walker" 
 }
Exemple #2
0
 public VirtualPathContainer(ActorRefProvider provider, ActorPath path, InternalActorRef parent, LoggingAdapter log)
 {
     _parent   = parent;
     _log      = log;
     _provider = provider;
     _path     = path;
 }
 public RootGuardianSupervisor(RootActorPath root, ActorRefProvider provider, TaskCompletionSource <Status> terminationPromise, LoggingAdapter log)
 {
     _log = log;
     _terminationPromise = terminationPromise;
     _provider           = provider;
     _path = root / "_Root-guardian-supervisor";   //In akka this is root / "bubble-walker"
 }
Exemple #4
0
        public static Task <T> Ask <T>(this ICanTell self, object message, TimeSpan?timeout = null)
        {
            ActorRefProvider provider = ResolveProvider(self);

            if (provider == null)
            {
                throw new NotSupportedException("Unable to resolve the target Provider");
            }

            ActorRef replyTo = ResolveReplyTo();

            return(Ask(self, replyTo, message, provider, timeout).ContinueWith(t => (T)t.Result));
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="DeadLetterActorRef" /> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="path">The path.</param>
 /// <param name="eventStream">The event stream.</param>
 public DeadLetterActorRef(ActorRefProvider provider, ActorPath path, EventStream eventStream)
 {
     this.eventStream = eventStream;
     this.path        = path;
     this.provider    = provider;
 }
Exemple #6
0
 public DeadLetterActorRef(ActorRefProvider provider, ActorPath path, EventStream eventStream) : base(provider,path,eventStream)
 {
     _eventStream = eventStream;
 }
Exemple #7
0
        private static Task <object> Ask(ICanTell self, ActorRef replyTo, object message, ActorRefProvider provider,
                                         TimeSpan?timeout)
        {
            var result = new TaskCompletionSource <object>();

            if (timeout.HasValue)
            {
                var cancellationSource = new CancellationTokenSource();
                cancellationSource.Token.Register(() => result.TrySetCanceled());
                cancellationSource.CancelAfter(timeout.Value);
            }

            //create a new tempcontainer path
            ActorPath path = provider.TempPath();
            //callback to unregister from tempcontainer
            Action unregister = () => provider.UnregisterTempActor(path);
            var    future     = new FutureActorRef(result, replyTo, unregister, path);

            //The future actor needs to be registered in the temp container
            provider.RegisterTempActor(future, path);
            self.Tell(message, future);
            return(result.Task);
        }
Exemple #8
0
 public DeadLetterActorRef(ActorRefProvider provider, ActorPath path, EventStream eventStream)
     : base(provider, path, eventStream)
 {
     _eventStream = eventStream;
 }
Exemple #9
0
 public VirtualPathContainer(ActorRefProvider provider, ActorPath path, InternalActorRef parent)
 {
     Path          = path;
     this.parent   = parent;
     this.provider = provider;
 }
 public EmptyLocalActorRef(ActorRefProvider provider, ActorPath path, EventStream eventStream)
 {
     _provider = provider;
     _path = path;
     _eventStream = eventStream;
 }
 public EmptyLocalActorRef(ActorRefProvider provider, ActorPath path, EventStream eventStream)
 {
     _provider    = provider;
     _path        = path;
     _eventStream = eventStream;
 }
Exemple #12
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="DeadLetterActorRef" /> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="path">The path.</param>
 /// <param name="eventStream">The event stream.</param>
 public DeadLetterActorRef(ActorRefProvider provider, ActorPath path, EventStream eventStream)
 {
     this.eventStream = eventStream;
     this.path = path;
     this.provider = provider;
 }
Exemple #13
0
 public VirtualPathContainer(ActorRefProvider provider, ActorPath path, InternalActorRef parent)
 {
     Path = path;
     this.parent = parent;
     this.provider = provider;
 }