private ThreadingService() { DBThread = new ThreadWorkerQueue("Database Thread"); if (!DBThread.Start()) { throw new Exception("Couldn't start DB Thread!"); } IOThread = new ThreadWorkerQueue("IO Thread"); if (!IOThread.Start()) { throw new Exception("Couldn't start DB Thread!"); } }
//-------------------------------------------------------------------------- public Queries(ThreadWorkerQueue workerThread) { this._workerThread = workerThread; // if lines is true, we return surrounding lines, if false, we return // sorrounding sentences _useLinesForContentRetreival = GlobalParamatersService.Configuration .ContentRetreivalResolution .UseLines; // delta is a whole number of how many lines/sentences to retreive // before and after the line/sentence in which the given word is in _contentRetreivalDelta = GlobalParamatersService.Configuration.ContentRetreivalResolution.Delta; }
//-------------------------------------------------------------------------- public Groups(ThreadWorkerQueue workerThread, IStatsUpdates statsUpdate) { this._workerThread = workerThread; this._statsUpdate = statsUpdate; }
//-------------------------------------------------------------------------- public Relations(ThreadWorkerQueue workerThread, IStatsUpdates statsUpdate) { this._workerThread = workerThread; this._statsUpdate = statsUpdate; }
//-------------------------------------------------------------------------- public ExportImport(ThreadWorkerQueue workerThread, IStatsUpdates statsUpdate) { this._workerThread = workerThread; this._statsUpdate = statsUpdate; }
//-------------------------------------------------------------------------- public Statistics(ThreadWorkerQueue workerThread) { this._workerThread = workerThread; }