Esempio n. 1
0
 /// <summary>
 /// Constructs this data source.
 /// </summary>
 public LuceneDataSource(DatabaseLayout directoryStructure, Config config, IndexConfigStore indexStore, FileSystemAbstraction fileSystemAbstraction, OperationalMode operationalMode)
 {
     this._directoryStructure    = directoryStructure;
     this._config                = config;
     this._indexStore            = indexStore;
     this._typeCache             = new IndexTypeCache(indexStore);
     this._fileSystemAbstraction = fileSystemAbstraction;
     this._operationalMode       = operationalMode;
 }
Esempio n. 2
0
        public override void Init()
        {
            LuceneFilesystemFacade filesystemFacade = _config.get(Configuration.Ephemeral) ? LuceneFilesystemFacade.Memory : LuceneFilesystemFacade.Fs;

            _readOnly           = IsReadOnly(_config, _operationalMode);
            _indexSearchers     = new IndexClockCache(_config.get(Configuration.LuceneSearcherCacheSize));
            this._baseStorePath = filesystemFacade.ensureDirectoryExists(_fileSystemAbstraction, GetLuceneIndexStoreDirectory(_directoryStructure));
            filesystemFacade.cleanWriteLocks(_baseStorePath);
            this._typeCache             = new IndexTypeCache(_indexStore);
            this._indexReferenceFactory = _readOnly ? new ReadOnlyIndexReferenceFactory(filesystemFacade, _baseStorePath, _typeCache) : new WritableIndexReferenceFactory(filesystemFacade, _baseStorePath, _typeCache);
            this._indexTypeMap          = new ConcurrentDictionary <IndexIdentifier, IDictionary <string, DocValuesType> >();
            _closed = false;
        }
Esempio n. 3
0
 internal WritableIndexReferenceFactory(LuceneDataSource.LuceneFilesystemFacade filesystemFacade, File baseStorePath, IndexTypeCache typeCache) : base(filesystemFacade, baseStorePath, typeCache)
 {
 }
Esempio n. 4
0
 public ReadOnlyIndexReferenceFactory(LuceneDataSource.LuceneFilesystemFacade filesystemFacade, File baseStorePath, IndexTypeCache typeCache) : base(filesystemFacade, baseStorePath, typeCache)
 {
 }
Esempio n. 5
0
 internal IndexReferenceFactory(LuceneDataSource.LuceneFilesystemFacade filesystemFacade, File baseStorePath, IndexTypeCache typeCache)
 {
     this._filesystemFacade = filesystemFacade;
     this._baseStorePath    = baseStorePath;
     this._typeCache        = typeCache;
 }