Examples of NativeFSLockFactory


Examples of org.apache.lucene.store.NativeFSLockFactory

        if (name.equals(".")) {
            dir = baseDir;
        } else {
            dir = new File(baseDir, name);
        }
        return FSDirectory.getDirectory(dir, new NativeFSLockFactory(dir));
    }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

     */
    PersistentIndex(String name, File indexDir, Analyzer analyzer,
                    Similarity similarity, DocNumberCache cache,
                    IndexingQueue indexingQueue)
            throws IOException {
        super(analyzer, similarity, FSDirectory.getDirectory(indexDir, new NativeFSLockFactory(indexDir)),
                cache, indexingQueue);
        this.name = name;
        if (isExisting()) {
            IndexMigration.migrate(this, indexDir);
        }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

        private final FSDirectory directory;

        public FSDir(File dir) throws IOException {
            directory = FSDirectory.getDirectory(dir,
                    new NativeFSLockFactory(dir));
        }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

            if (!dir.mkdirs()) {
                if (!dir.isDirectory()) {
                    throw new IOException("Unable to create directory: '" + dir + "'");
                }
            }
            LockFactory lockFactory = new NativeFSLockFactory(dir);
            if (simpleFS) {
                directory = new SimpleFSDirectory(dir, lockFactory);
            } else {
                directory = FSDirectory.open(dir, lockFactory);
            }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

        private final FSDirectory directory;

        public FSDir(File dir) throws IOException {
            directory = FSDirectory.getDirectory(dir,
                    new NativeFSLockFactory(dir));
        }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

                if (!dir.isDirectory()) {
                    throw new IOException("Unable to create directory: '" + dir + "'");
                }
            }
            directory = FSDirectory.open(dir,
                    new NativeFSLockFactory(dir));
        }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

         spellIndexDirectory = null;
         SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<Object>()
         {
            public Object run() throws Exception
            {
               spellIndexDirectory = FSDirectory.getDirectory(path, new NativeFSLockFactory(path));
               if (IndexReader.indexExists(spellIndexDirectory))
               {
                  lastRefresh = System.currentTimeMillis();
               }
               return null;
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

               if (!dir.mkdirs())
               {
                  throw new IOException("Cannot create directory: " + dir);
               }
            }
            return FSDirectory.open(dir, new NativeFSLockFactory(dir));
         }
      });
   }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

    else if ( "native".equals( lockFactoryName ) ) {
      if ( indexDir==null ) {
        throw new SearchException( "To use \"native\" as a LockFactory strategy an indexBase path must be set");
      }
      try {
        return new NativeFSLockFactory( indexDir );
      } catch (IOException e) {
        throw new SearchException( "Could not initialize NativeFSLockFactory", e);
      }
    }
    else if ( "single".equals( lockFactoryName ) ) {
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

    }
    else if ( "native".equals( lockFactoryName ) ) {
      if ( indexDir == null ) {
        throw new SearchException( "To use \"native\" as a LockFactory strategy an indexBase path must be set" );
      }
      return new NativeFSLockFactory( indexDir );
    }
    else if ( "single".equals( lockFactoryName ) ) {
      return new SingleInstanceLockFactory();
    }
    else if ( "none".equals( lockFactoryName ) ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.