Пример #1
0
        public static Pipeline Create(string name, IElementProcessor elementProcessor,IBrowsableElementStore elementStore)
        {
            const int minimumPendingEvents = 10;
            const int batchSize = 20;

            return new Pipeline(name, elementProcessor, elementStore, new ThresholdedFetchPolicy(minimumPendingEvents, batchSize));
        }
Пример #2
0
 public Pipeline(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore, IFetchPolicy fetchPolicy)
 {
     _name = name;
     _elementStore = elementStore;
     _demultiplexer = new Demultiplexer();
     _demultiplexer.EventDemultiplexed += OnDemultiplexed;
     _processor = new PipelineProcessor(elementProcessor);
     _processor.EventProcessed += OnEventProcessed;
     _fetcher = new ElementFetcher(fetchPolicy, _elementStore, name);
     _fetcher.ElementFetched += OnElementFetched;
     _fetchTimer = new Timer(x => EvaluateFetchPolicy(), null, TimeSpan.Zero, TimeSpan.FromSeconds(1));
 }
Пример #3
0
 public Pipeline(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore, IFetchPolicy fetchPolicy)
 {
     _name          = name;
     _elementStore  = elementStore;
     _demultiplexer = new Demultiplexer();
     _demultiplexer.EventDemultiplexed += OnDemultiplexed;
     _processor = new PipelineProcessor(elementProcessor);
     _processor.EventProcessed += OnEventProcessed;
     _fetcher = new ElementFetcher(fetchPolicy, _elementStore, name);
     _fetcher.ElementFetched += OnElementFetched;
     _fetchTimer              = new Timer(x => EvaluateFetchPolicy(), null, TimeSpan.Zero, TimeSpan.FromSeconds(1));
 }
 public void SetUp()
 {
     _event      = new FakeProcessingElement();
     _eventStore = MockRepository.GenerateMock <IBrowsableElementStore>();
     _eventQueue = MockRepository.GenerateMock <IEventQueue>();
 }
 public LazyMarkingBrowsableElementStore(IBrowsableElementStore wrappedStore, int threshold = DefaultThreshold)
 {
     _wrappedStore = wrappedStore;
     _threshold = threshold;
 }
Пример #6
0
 public ElementFetcher(IFetchPolicy fetchPolicy, IBrowsableElementStore elementStore, string pipelineName)
 {
     _fetchPolicy = fetchPolicy;
     _pipelineName = pipelineName;
     _elementStore = elementStore;
 }
Пример #7
0
 public InMemoryBufferedBrowsableElementStore(IBrowsableElementStore persistentStore, int fetchSize)
 {
     _persistentStore = persistentStore;
     _fetchSize       = fetchSize;
     _buffer          = new FixedSizeChunkBuffer(fetchSize);
 }
 public InMemoryBufferedBrowsableElementStore(IBrowsableElementStore persistentStore, int fetchSize)
 {
     _persistentStore = persistentStore;
     _fetchSize = fetchSize;
     _buffer = new FixedSizeChunkBuffer(fetchSize);
 }
 public void SetUp()
 {
     _event = new FakeProcessingElement();
     _eventStore = MockRepository.GenerateMock<IBrowsableElementStore>();
     _eventQueue = MockRepository.GenerateMock<IEventQueue>();
 }
Пример #10
0
 public static Pipeline CreateWithLazyElementMarking(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore)
 {
     return Create(name,elementProcessor, new LazyMarkingBrowsableElementStore(elementStore));
 }
Пример #11
0
        public static Pipeline Create(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore)
        {
            const int minimumPendingEvents = 10;
            const int batchSize            = 20;

            return(new Pipeline(name, elementProcessor, elementStore, new ThresholdedFetchPolicy(minimumPendingEvents, batchSize)));
        }
Пример #12
0
 public static Pipeline CreateWithLazyElementMarking(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore)
 {
     return(Create(name, elementProcessor, new LazyMarkingBrowsableElementStore(elementStore)));
 }
 public LazyMarkingBrowsableElementStore(IBrowsableElementStore wrappedStore, int threshold = DefaultThreshold)
 {
     _wrappedStore = wrappedStore;
     _threshold    = threshold;
 }
Пример #14
0
 public ElementFetcher(IFetchPolicy fetchPolicy, IBrowsableElementStore elementStore, string pipelineName)
 {
     _fetchPolicy  = fetchPolicy;
     _pipelineName = pipelineName;
     _elementStore = elementStore;
 }