Examples of AlreadyClosedException


Examples of org.apache.lucene.store.AlreadyClosedException

   * 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

Examples of org.apache.lucene.store.AlreadyClosedException

        throw new RuntimeException(ie);
      }
    }

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

Examples of org.apache.lucene.store.AlreadyClosedException

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

Examples of org.apache.lucene.store.AlreadyClosedException

  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

Examples of org.apache.lucene.store.AlreadyClosedException

   */
  public final G acquire() throws IOException {
    G ref;
    do {
      if ((ref = current) == null) {
        throw new AlreadyClosedException(REFERENCE_MANAGER_IS_CLOSED_MSG);
      }
    } while (!tryIncRef(ref));
    return ref;
  }
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

   */
  public final void decRef() throws IOException {
    // only check refcount here (don't call ensureOpen()), so we can
    // still close the reader if it was made invalid by a child:
    if (refCount.get() <= 0) {
      throw new AlreadyClosedException("this IndexReader is closed");
    }
   
    final int rc = refCount.decrementAndGet();
    if (rc == 0) {
      boolean success = false;
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

   * Throws AlreadyClosedException if this IndexReader or any
   * of its child readers is closed, otherwise returns.
   */
  protected final void ensureOpen() throws AlreadyClosedException {
    if (refCount.get() <= 0) {
      throw new AlreadyClosedException("this IndexReader is closed");
    }
    // the happens before rule on reading the refCount, which must be after the fake write,
    // ensures that we see the value:
    if (closedByChild) {
      throw new AlreadyClosedException("this IndexReader cannot be used anymore as one of its child readers was closed");
    }
  }
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

     * @return Currently stored value or {@code null} if no value is stored
     * @throws AlreadyClosedException if the Analyzer is closed.
     */
    protected final Object getStoredValue(Analyzer analyzer) {
      if (analyzer.storedValue == null) {
        throw new AlreadyClosedException("this Analyzer is closed");
      }
      return analyzer.storedValue.get();
    }
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

     * @param storedValue Value to store
     * @throws AlreadyClosedException if the Analyzer is closed.
     */
    protected final void setStoredValue(Analyzer analyzer, Object storedValue) {
      if (analyzer.storedValue == null) {
        throw new AlreadyClosedException("this Analyzer is closed");
      }
      analyzer.storedValue.set(storedValue);
    }
View Full Code Here

Examples of org.apache.lucene.store.AlreadyClosedException

  }
 
  /** Ensure that replicator is still open, or throw {@link AlreadyClosedException} otherwise. */
  protected final synchronized void ensureOpen() {
    if (closed) {
      throw new AlreadyClosedException("This replicator has already been closed");
    }
  }
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.