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)); }
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; }
public ElementFetcher(IFetchPolicy fetchPolicy, IBrowsableElementStore elementStore, string pipelineName) { _fetchPolicy = fetchPolicy; _pipelineName = pipelineName; _elementStore = elementStore; }
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>(); }
public static Pipeline CreateWithLazyElementMarking(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore) { return Create(name,elementProcessor, new LazyMarkingBrowsableElementStore(elementStore)); }
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))); }
public static Pipeline CreateWithLazyElementMarking(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore) { return(Create(name, elementProcessor, new LazyMarkingBrowsableElementStore(elementStore))); }