public FailyInPreStartGraphStage(CountdownEvent evilLatch) { _evilLatch = evilLatch; In = new Inlet <int>("test.in"); Out0 = new Outlet <int>("test.out0"); Out1 = new Outlet <int>("test.out1"); Shape = new FanOutShape <int, int, int>(In, Out0, Out1); }
public Logic(FanOutShape <int, int, int> shape, CountdownEvent evilLatch) : base(shape) { _shape = shape; _evilLatch = evilLatch; SetHandler(shape.Out0, IgnoreTerminateOutput); // We fail in PreStart anyway SetHandler(shape.Out1, IgnoreTerminateOutput); // We fail in PreStart anyway PassAlong(shape.In, shape.Out1); }
protected UnfoldFlowGraphStageLogic(FanOutShape <TIn, TState, TOut> shape, TState seed, TimeSpan timeout) : base(shape) { _timeout = timeout; _feedback = shape.Out0; _output = shape.Out1; _nextElem = shape.In; _pending = seed; _pushedToCycle = false; SetHandler(_feedback, this); SetHandler(_output, onPull: () => { Pull(_nextElem); if (!_pushedToCycle && IsAvailable(_feedback)) { Push(_feedback, _pending); _pending = default(TState); _pushedToCycle = true; } }); }
public UnfoldFlowGraphStageLogic(FanOutShape <Tuple <TState, TOut>, TState, TOut> shape, TState seed, TimeSpan timeout) : base(shape, seed, timeout) { SetHandler(_nextElem, this); }
public UnfoldFlowWithGraphStageLogic(FanOutShape <TFlowOut, TState, TOut> shape, TState seed, Func <TFlowOut, Option <Tuple <TState, TOut> > > unfoldWith, TimeSpan timeout) : base(shape, seed, timeout) { _unfoldWith = unfoldWith; SetHandler(_nextElem, this); }
public FanOut2UnfoldingStage(Func <FanOutShape <TIn, TState, TOut>, UnfoldFlowGraphStageLogic <TIn, TState, TOut> > generateGraphStageLogic) { _generateGraphStageLogic = generateGraphStageLogic; Shape = new FanOutShape <TIn, TState, TOut>("unfoldFlow"); }