예제 #1
0
 public Writer(Index index)
 {
     this.index = index;
     pool = new MiscUtil.Threading.CustomThreadPool(index.Path);
     pool.SetMinMaxThreads(0, 5);
     pool.IdlePeriod = 10;
     pool.WorkerThreadPriority = ThreadPriority.BelowNormal;
     pool.WorkerThreadsAreBackground = false;
     pool.BeforeWorkItem += new BeforeWorkItemHandler(pool_BeforeWorkItem);
     pool.AfterWorkItem += new AfterWorkItemHandler(pool_AfterWorkItem);
     pool.WorkerException += new ThreadPoolExceptionHandler(pool_WorkerException);
 }
예제 #2
0
파일: Index.cs 프로젝트: mrkurt/mubble-old
 static Index Create(string path)
 {
     indexCollectionLock.EnterWriteLock();
     try
     {
         if (indexes.ContainsKey(path))
         {
             return indexes[path];
         }
         else
         {
             var index = new Index(path);
             indexes.Add(path, index);
             return index;
         }
     }
     finally
     {
         indexCollectionLock.ExitWriteLock();
     }
 }
예제 #3
0
 public Searcher(Index index)
 {
     this.index = index;
     this.index.Changed += ResetSearcher;
     this.ResetSearcher();
 }
예제 #4
0
 public SchemaManager(Index index)
 {
     this.index = index;
     this.schemaLock = new ReaderWriterLockSlim();
     this.cache = new Dictionary<string, Schema>(StringComparer.CurrentCultureIgnoreCase);
 }
예제 #5
0
 public Schema GetSchema(Index index)
 {
     return index.GetSchema(this.Name, this.Version);
 }
예제 #6
0
 public Database(Index index, Settings settings)
 {
     this.index = index;
     this.settings = settings;
 }