static Buffer()
        {
            var config = BufferSection.Get();

            _writeInterval = config.WriteInterval;
            if (config.MaxBufferSize >= 0)
            {
                _maxQueueSize = config.MaxBufferSize;
            }

            _store = SettingsStoreFactory.GetDataStorer();
            new Thread(() => {
                try {
                    StartReader();
                }
                catch (Exception e) {
                    _logger.LogException(string.Format("Error in queue runner thread, stopping execution"), e);
                }
            }).Start();
        }
Esempio n. 2
0
 public DataHandler(string localPath)
 {
     _localPath = localPath;
     _performanceDataProvider = SettingsStoreFactory.GetDataProvider();
 }