Package org.apache.lucene.store

Examples of org.apache.lucene.store.AlreadyClosedException


   * closed.
   * @throws AlreadyClosedException if this IndexWriter is closed
   */
  protected final void ensureOpen(boolean includePendingClose) throws AlreadyClosedException {
    if (closed || (includePendingClose && closing)) {
      throw new AlreadyClosedException("this IndexWriter is closed");
    }
  }
View Full Code Here


   * closed.
   * @throws AlreadyClosedException if this IndexWriter is
   */
  protected synchronized final void ensureOpen(boolean includePendingClose) throws AlreadyClosedException {
    if (!isOpen(includePendingClose)) {
      throw new AlreadyClosedException("this IndexWriter is closed");
    }
  }
View Full Code Here

        throw new RuntimeException(ie);
      }
    }

    if (closed)
      throw new AlreadyClosedException("this IndexWriter is closed");
  }
View Full Code Here

      aSearcher.getIndexReader().decRef();     
  }
 
  private void ensureOpen() {
    if (closed) {
      throw new AlreadyClosedException("Spellchecker has been closed");
    }
  }
View Full Code Here

     */
    final IndexSearcher indexSearcher = createSearcher(dir);
    synchronized (searcherLock) {
      if(closed){
        indexSearcher.close();
        throw new AlreadyClosedException("Spellchecker has been closed");
      }
      if (searcher != null) {
        searcher.close();
      }
      // set the spellindex in the sync block - ensure consistency.
View Full Code Here

  /**
   * @throws AlreadyClosedException if this FieldsReader is closed
   */
  private void ensureOpen() throws AlreadyClosedException {
    if (closed) {
      throw new AlreadyClosedException("this FieldsReader is closed");
    }
  }
View Full Code Here

      if (commit != null) {
        throw new IllegalArgumentException("a reader obtained from IndexWriter.getReader() cannot currently accept a commit");
      }

      if (!writer.isOpen(true)) {
        throw new AlreadyClosedException("cannot reopen: the IndexWriter this reader was obtained from is now closed");
      }

      // TODO: right now we *always* make a new reader; in
      // the future we could have write make some effort to
      // detect that no changes have occurred
View Full Code Here

      isOpen = false;
   }

   private void checkIsOpen() throws AlreadyClosedException {
      if (!isOpen) {
         throw new AlreadyClosedException("this Directory is closed");
      }
   }
View Full Code Here

      isOpen = false;
   }

   private void checkIsOpen() throws AlreadyClosedException {
      if (!isOpen) {
         throw new AlreadyClosedException("this Directory is closed");
      }
   }
View Full Code Here

  /**
   * ensure open.
   */
  private void ensureOpen() {
    if (closed) {
      throw new AlreadyClosedException("Spellchecker has been closed");
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.store.AlreadyClosedException

Copyright © 2018 www.massapicom. 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.