Ejemplo 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;
 }
Ejemplo 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;
        }
Ejemplo n.º 3
0
 internal WritableIndexReferenceFactory(LuceneDataSource.LuceneFilesystemFacade filesystemFacade, File baseStorePath, IndexTypeCache typeCache) : base(filesystemFacade, baseStorePath, typeCache)
 {
 }
Ejemplo n.º 4
0
 public ReadOnlyIndexReferenceFactory(LuceneDataSource.LuceneFilesystemFacade filesystemFacade, File baseStorePath, IndexTypeCache typeCache) : base(filesystemFacade, baseStorePath, typeCache)
 {
 }
Ejemplo n.º 5
0
 internal IndexReferenceFactory(LuceneDataSource.LuceneFilesystemFacade filesystemFacade, File baseStorePath, IndexTypeCache typeCache)
 {
     this._filesystemFacade = filesystemFacade;
     this._baseStorePath    = baseStorePath;
     this._typeCache        = typeCache;
 }