public ParseErrorStage(IErrorParser errorParser, IEventDiscarder eventDiscarder, IPipelineStage nextStage) { _errorParser = errorParser; _eventDiscarder = eventDiscarder; _nextStage = nextStage; }
public PersisterDaemon(IStreamIngestorConfiguration configuration, IEventPersister eventPersister, IEventDiscarder eventDiscarder) { _configuration = configuration; _eventPersister = eventPersister; _eventDiscarder = eventDiscarder; _persistQueue = new ConcurrentQueue<ErrorInstanceEntity>(); _errorDefinitions = new ConcurrentDictionary<string, ErrorDefinitionEntity>(); _lastPersisted = DateTime.UtcNow; _stringCache = new Dictionary<int, string>(); _fingerprintCache = new Dictionary<int, Fingerprint>(); _serverCache = new Dictionary<int, string>(); }
public BatchLogIngestor(IEventFilterFactory eventFilterFactory = null, IErrorParser errorParser = null, IContentFilterFactory contentFilterFactory = null, IEventDiscarder eventDiscarder = null, IEventPersister eventPersister = null, IEventRejecter eventRejecter = null) { _eventPersister = eventPersister; _eventFilterFactory = eventFilterFactory; _eventDiscarder = eventDiscarder; _errorParser = errorParser; _contentFilterFactory = contentFilterFactory; _eventRejecter = eventRejecter; _firstPipelineStage = BuildPipeline(); }
public StreamLogIngestor(IEventFilterFactory eventFilterFactory, IErrorParser errorParser, IContentFilterFactory contentFilterFactory, IEventDiscarder eventDiscarder, IPersisterDaemon persisterDaemon, IEventRejecter eventRejecter) { _eventFilterFactory = eventFilterFactory; _eventDiscarder = eventDiscarder; _errorParser = errorParser; _contentFilterFactory = contentFilterFactory; _persisterDaemon = persisterDaemon; _eventRejecter = eventRejecter; _firstPipelineStage = BuildPipeline(); _cancellationTokenSource = new CancellationTokenSource(); _persisterDaemon.Start(_cancellationTokenSource.Token); }
public IBatchIngestorFactoryDescriptor WithDiscarder(IEventDiscarder eventDiscarder) { _eventDiscarder = eventDiscarder; return this; }
public IBatchIngestorFactoryDescriptor WithNullDiscarder() { _eventDiscarder = new NullEventDiscarder(); return this; }
public IBatchLogIngestor Build() { if(_errorParser == null) _errorParser = new CustomErrorParser(new CustomParserConfiguration()); if(_contentFilterFactory == null) _contentFilterFactory = new ContentFilterFactory(); if(_eventDiscarder == null) _eventDiscarder = new NullEventDiscarder(); if(_eventFilterFactory == null) _eventFilterFactory = new EventFilterFactory(); if(_eventPersister == null) _eventPersister = BuildDefaultEventPersister(); if(_eventRejecter == null) _eventRejecter = new NullEventRejecter(); return new BatchLogIngestor(_eventFilterFactory, _errorParser, _contentFilterFactory, _eventDiscarder, _eventPersister, _eventRejecter); }
public IStreamIngestorFactoryDescriptor WithDiscarder(Discarders.IEventDiscarder eventDiscarder) { _eventDiscarder = eventDiscarder; return this; }
public IPersisterDaemon BuildDefaultPersisterDaemon(IStreamIngestorConfiguration streamIngestorConfiguration = null, IPersistenceConfiguration persistenceConfiguration = null) { if(streamIngestorConfiguration == null) streamIngestorConfiguration = new StreamIngestorConfiguration(); if(persistenceConfiguration == null) persistenceConfiguration = new PersistenceConfiguration(); var eventPersister = new EventPersister(persistenceConfiguration, new DataExtractor(persistenceConfiguration, new FingerprintReader(persistenceConfiguration), new ServerReader(persistenceConfiguration), new ServerWriter(persistenceConfiguration)), new ErrorDefinitionWriter(persistenceConfiguration), new TimelineWriter(persistenceConfiguration)); if (_eventDiscarder == null) _eventDiscarder = new NullEventDiscarder(); return new PersisterDaemon(streamIngestorConfiguration, eventPersister, _eventDiscarder); }