Examples of AlreadyClosedException


Examples of org.apache.lucene.store.AlreadyClosedException

      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

Examples of org.apache.lucene.store.AlreadyClosedException

      isOpen = false;
   }

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

Examples of org.apache.lucene.store.AlreadyClosedException

      isOpen = false;
   }

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

Examples of org.apache.lucene.store.AlreadyClosedException

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

Examples of org.apache.lucene.store.AlreadyClosedException

   * @param indexDir {@link Directory} to get the {@link IndexAccessor} for.
   * @return {@link IndexAccessor} for the {@link Directory}.
   */
  public IndexAccessor getAccessor(final Directory indexDir) throws AlreadyClosedException {
    if (wasClosed) {
      throw new AlreadyClosedException("IndexAccessorFactory was already closed" + ". Maybe there is a shutdown in progress.");
    }
    IndexAccessor indexAccessor = indexAccessors.get(indexDir);
    if (indexAccessor == null) {
      throw new IllegalStateException("Requested Accessor does not exist");
    }
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

   *            {@link Directory} to get the {@link DefaultTaxonomyAccessor} for.
   * @return {@link DefaultTaxonomyAccessor} for the {@link Directory}.
   */
  public TaxonomyAccessor getAccessor(Directory dir) {
    if (wasClosed) {
      throw new AlreadyClosedException(
          "TaxonomyAccessorFactory was already closed"
              + ". Maybe there is a shutdown in progress.");
    }
   
    TaxonomyAccessor accessor = taxonomyAccessors.get(dir);
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

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

Examples of org.apache.lucene.store.AlreadyClosedException

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

Examples of org.apache.lucene.store.AlreadyClosedException

      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      }

    if (closed)
      throw new AlreadyClosedException("this IndexWriter is closed");

    if (segment == null)
      segment = writer.newSegmentName();

    numDocsInRAM++;
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

   * to persistent storage.
   */
  @Override
  public synchronized void close() {
    if (isClosed) {
      throw new AlreadyClosedException("Already closed");
    }
    isClosed = true;
    try {
      nrtManager.close();
      if (analyzer != null) {
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.