Examples of NativeFSLockFactory


Examples of org.apache.lucene.store.NativeFSLockFactory

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

Examples of org.apache.lucene.store.NativeFSLockFactory

    *           if an error occurs while opening / creating the index.
    */
   PersistentIndex(String name, File indexDir, Analyzer analyzer, DocNumberCache cache, IndexingQueue indexingQueue)
            throws IOException
   {
      super(analyzer, FSDirectory.getDirectory(indexDir, new NativeFSLockFactory(indexDir)), cache, indexingQueue);
      this.name = name;
   }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

       */
      InternalSpellChecker(SearchIndex handler) throws IOException
      {
         this.handler = handler;
         String path = handler.getContext().getIndexDirectory() + File.separatorChar + "spellchecker";
         this.spellIndexDirectory = FSDirectory.getDirectory(path, new NativeFSLockFactory(path));
         if (IndexReader.indexExists(spellIndexDirectory))
         {
            this.lastRefresh = System.currentTimeMillis();
         }
         this.spellChecker = new SpellChecker(spellIndexDirectory);
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

  InternalSpellChecker(SearchIndex handler) throws IOException {
      this.handler = handler;
      String path = handler.getContext().getIndexDirectory()
        + File.separatorChar + "spellchecker";
      this.spellIndexDirectory = FSDirectory.getDirectory(path,
        new NativeFSLockFactory(path));
      if (IndexReader.indexExists(spellIndexDirectory)) {
    this.lastRefresh = System.currentTimeMillis();
      }
      this.spellChecker = new SpellChecker(spellIndexDirectory);
      refreshSpellChecker();
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 );
      }
    }
View Full Code Here

Examples of org.apache.lucene.store.NativeFSLockFactory

      new Function() {
        public void run() throws Exception {
          String LOCK_FILE = "write.lock";
          String dicHome = p
              .getProperty("paoding.dic.home.absolute.path");
          FSLockFactory FileLockFactory = new NativeFSLockFactory(
              dicHome);
          Lock lock = FileLockFactory.makeLock(LOCK_FILE);

          boolean obtained = false;
          try {
            obtained = lock.obtain(90000);
            if (obtained) {
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" );
      }
      try {
        return new NativeFSLockFactory( indexDir );
      }
      catch ( IOException e ) {
        throw new SearchException( "Could not initialize NativeFSLockFactory", e );
      }
    }
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 );
      }
    }
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.