Beispiel #1
0
        public InputOutputAdapter(ISourceNode <T> output)
        {
            _queueMap   = new ConcurrentDictionary <INode, BlockingCollection <T> >();
            _sinkNodes  = new ConcurrentBag <ISinkNode <T> >();
            _sourceNode = output;
            _log        = EtlLibConfig.LoggingAdapter.CreateLogger("EtlLib.IOAdapter");

            if (output is IBlockingNode)
            {
                var signaller = new BlockingWaitSignaller();
                ((IBlockingNode)output).SetWaitSignaller(WaitSignaller);
                Waiter        = signaller;
                WaitSignaller = signaller;
            }
            else
            {
                Waiter = new NoWaitNodeWaiter();
            }

            _sourceNode.SetEmitter(this);
        }
Beispiel #2
0
 public INode SetWaiter(INodeWaiter waiter)
 {
     Waiter = waiter;
     return(this);
 }