Example #1
0
        public int Init(IActorRef self, SubFusingActorMaterializerImpl subMat, Action <object> enqueueToShourtCircuit, int eventLimit)
        {
            Self = self;
            _enqueueToShourtCircuit = enqueueToShourtCircuit;

            for (int i = 0; i < _inputs.Length; i++)
            {
                var input = new ActorGraphInterpreter.BatchingActorInputBoundary(_settings.MaxInputBufferSize, i);
                _inputs[i] = input;
                Interpreter.AttachUpstreamBoundary(i, input);
            }

            var offset = _assembly.ConnectionCount - _outputs.Length;

            for (int i = 0; i < _outputs.Length; i++)
            {
                var outputType = _shape.Outlets[i].GetType().GetGenericArguments().First();
                var output     = (ActorGraphInterpreter.IActorOutputBoundary) typeof(ActorGraphInterpreter.ActorOutputBoundary <>).Instantiate(outputType, Self, this, i);
                _outputs[i] = output;
                Interpreter.AttachDownstreamBoundary(i + offset, (GraphInterpreter.DownstreamBoundaryStageLogic)output);
            }

            Interpreter.Init(subMat);
            return(RunBatch(eventLimit));
        }
Example #2
0
        public ActorGraphInterpreter(GraphInterpreterShell shell)
        {
            _initial = shell;

            _subFusingMaterializerImpl = new SubFusingActorMaterializerImpl(shell.Materializer, RegisterShell);
            _eventLimit   = _initial.Materializer.Settings.SyncProcessingLimit;
            _currentLimit = _eventLimit;
        }
Example #3
0
        public ActorGraphInterpreter(GraphInterpreterShell shell)
        {
            _initial = shell;

            _subFusingMaterializerImpl = new SubFusingActorMaterializerImpl(shell.Materializer, RegisterShell);
        }