Package org.apache.lucene.store

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


   *            {@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

  /**
   * @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

   * 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

      } 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

   * 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

   * 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

  // compare to its version
  private final ConcurrentHashMap<Long,SearcherTracker> searchers = new ConcurrentHashMap<Long,SearcherTracker>();

  private void ensureOpen() {
    if (closed) {
      throw new AlreadyClosedException("this SearcherLifetimeManager instance is closed");
    }
  }
View Full Code Here

  private final List<RefreshListener> refreshListeners = new CopyOnWriteArrayList<RefreshListener>();

  private void ensureOpen() {
    if (current == null) {
      throw new AlreadyClosedException(REFERENCE_MANAGER_IS_CLOSED_MSG);
    }
  }
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.