private DPE_PublicationsSQLReader(string publicationsDataBaseConnectionString, string publicationName) { //gets a connection to the this._dataBaseSonnectionString = publicationsDataBaseConnectionString; this._locker = new object(); this._DATA_RESET_PCQ = new ThreadPooledProducerConsumerQueue(); this._DATA_RESET_PCQ.NewItemDetected += this.EventHandling_DATA_RESET_PCQ_NewItemDetected; this._DATA_UPDATE_PCQ = new ThreadPooledProducerConsumerQueue(); this._DATA_UPDATE_PCQ.NewItemDetected += this.EventHandling_DATA_UPDATE_PCQ_NewItemDetected; //creates the reading timer this._readTimer = new System.Timers.Timer(1500); this._readTimer.Elapsed += this.EventHandling_readTimer_Elapsed; this._readTimer.AutoReset = false; this._readTimer.Stop(); this._isFirstTimeRead = true; this._tablename = publicationName; this._keepReading = false; this._publicationName = publicationName; this._UPDATE_StatisticsHandler = new EventStatisticsHandler(); this._RESET_StatisticsHandler = new EventStatisticsHandler(); this._dataReadCommandTest = ""; this._lastRowIDReaded = -1; //initialization }
public DPE_PublicationsSQLWriter(string publicationsDataBaseConnectionString, string publicationName) { this._dataBaseConnectionString = publicationsDataBaseConnectionString; //clears the table every 30 seconds this._dataClearTimer = new System.Timers.Timer(60000); this._dataClearTimer.Elapsed += this.EventHandling__dataClearTimer_Elapsed; this._dataClearTimer.AutoReset = false; this._dataClearTimer.Start(); this._publicationName = publicationName; this._UPDATE_StatisticsHandler = new EventStatisticsHandler(); this._RESET_StatisticsHandler = new EventStatisticsHandler(); this._DATA_RESET_PCQ = new ThreadPooledProducerConsumerQueue(); this._DATA_RESET_PCQ.NewItemDetected += this.EventHandling_DATA_RESET_PCQ_NewItemDetected; this._DATA_UPDATE_PCQ = new ThreadPooledProducerConsumerQueue(); this._DATA_UPDATE_PCQ.NewItemDetected += this.EventHandling_DATA_UPDATE_PCQ_NewItemDetected; }