コード例 #1
0
 public SubstreamSubscription(IActorRef parent, SubstreamKey substream)
 {
     if (ReferenceEquals(parent, null))
     {
         throw new ArgumentNullException(nameof(parent), "Parent actor ref cannot be null");
     }
     Parent    = parent;
     Substream = substream;
 }
コード例 #2
0
        protected SubstreamOutput CreateSubstreamOutput()
        {
            var id          = new SubstreamKey(NextId());
            var cancellable = ScheduleSubscriptionTimeout(Self, new SubstreamSubscriptionTimeout(id));
            var output      = new SubstreamOutput(id, Self, this, cancellable);

            _substreamOutputs.Add(output.Key, output);
            return(output);
        }
コード例 #3
0
ファイル: GroupByProcessorImpl.cs プロジェクト: yfer/akka.net
        protected override void InvalidateSubstreamOutput(SubstreamKey substream)
        {
            if (!ReferenceEquals(_pendingSubstreamOutput, null) && substream == _pendingSubstreamOutput.Key)
            {
                _pendingSubstreamOutput = null;
                NextPhase(_waitNext);
            }

            base.InvalidateSubstreamOutput(substream);
        }
コード例 #4
0
        protected void CompleteSubstreamOutput(SubstreamKey substream)
        {
            SubstreamOutput output;

            if (_substreamOutputs.TryGetValue(substream, out output))
            {
                output.Complete();
                _substreamOutputs.Remove(substream);
            }
        }
コード例 #5
0
        protected void CancelSubstreamOutput(SubstreamKey substream)
        {
            SubstreamOutput output;

            if (_substreamOutputs.TryGetValue(substream, out output))
            {
                output.Cancel();
                _substreamOutputs.Remove(substream);
            }
        }
コード例 #6
0
 public SubstreamSubscriptionTimeout(SubstreamKey substream)
 {
     Substream = substream;
 }
コード例 #7
0
 public SubstreamSubscribe(SubstreamKey substream, ISubscriber <T> subscriber)
 {
     Substream  = substream;
     Subscriber = subscriber;
 }
コード例 #8
0
 public SubstreamCancel(SubstreamKey substream)
 {
     Substream = substream;
 }
コード例 #9
0
 public SubstreamRequestMore(SubstreamKey substream, long demand)
 {
     Substream = substream;
     Demand    = demand;
 }
コード例 #10
0
 protected virtual void InvalidateSubstreamOutput(SubstreamKey substream)
 {
     CancelSubstreamOutput(substream);
     Pump();
 }
コード例 #11
0
 public SubstreamOutput(SubstreamKey key, IActorRef actor, IPump pump, ICancelable subscriptionTimeout) : base(actor, pump)
 {
     Key = key;
     SubscriptionTimeout = subscriptionTimeout;
     _subscription       = new SubstreamSubscription(actor, key);
 }