Beispiel #1
0
 /// <summary>
 /// Creates a new server core
 /// </summary>
 /// <param name="baseLocation">Path to the stores directory</param>
 /// <param name="storeName">Name of store</param>
 public StoreWorker(string baseLocation, string storeName)
 {
     _baseLocation  = baseLocation;
     _storeName     = storeName;
     _storeLocation = Path.Combine(baseLocation, storeName);
     Logging.LogInfo("StoreWorker created with location {0}", _storeLocation);
     _jobs = new ConcurrentQueue <Job>();
     _jobExecutionStatus = new ConcurrentDictionary <string, JobExecutionStatus>();
     _storeManager       = StoreManagerFactory.GetStoreManager();
     _transactionLog     = _storeManager.GetTransactionLog(_storeLocation);
     _storeStatisticsLog = _storeManager.GetStatisticsLog(_storeLocation);
     _statsMonitor       = new StatsMonitor();
     InitializeStatsMonitor();
     _shutdownCompleted = new ManualResetEvent(false);
 }
 /// <summary>
 /// Creates a new server core 
 /// </summary>
 /// <param name="baseLocation">Path to the stores directory</param>
 /// <param name="storeName">Name of store</param>
 public StoreWorker(string baseLocation, string storeName)
 {
     _baseLocation = baseLocation;
     _storeName = storeName;
     _storeLocation = Path.Combine(baseLocation, storeName);
     Logging.LogInfo("StoreWorker created with location {0}", _storeLocation);
     _jobs = new ConcurrentQueue<Job>();
     _jobExecutionStatus = new ConcurrentDictionary<string, JobExecutionStatus>();
     _storeManager = StoreManagerFactory.GetStoreManager();
     _transactionLog = _storeManager.GetTransactionLog(_storeLocation);
     _storeStatisticsLog = _storeManager.GetStatisticsLog(_storeLocation);
     _statsMonitor = new StatsMonitor();
     InitializeStatsMonitor();
     _shutdownCompleted = new ManualResetEvent(false);
 }