Examples of decRef()


Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader.decRef()

  public int doLogic() throws IOException {
    PerfRunData runData = getRunData();
    DirectoryTaxonomyReader taxoReader = new DirectoryTaxonomyReader(runData.getTaxonomyDir());
    runData.setTaxonomyReader(taxoReader);
    // We transfer reference to the run data
    taxoReader.decRef();
    return 1;
  }
}
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader.decRef()

    ltr.incRef();
    ltr.close();
   
    // should not fail as we incRef() before close
    ltr.getSize();
    ltr.decRef();
   
    dir.close();
  }
 
  @Test
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader.decRef()

    ltr.incRef();
    ltr.close();
   
    // should not fail as we incRef() before close
    ltr.getSize();
    ltr.decRef();
   
    dir.close();
  }
 
  @Test
View Full Code Here

Examples of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader.decRef()

  public int doLogic() throws IOException {
    PerfRunData runData = getRunData();
    DirectoryTaxonomyReader taxoReader = new DirectoryTaxonomyReader(runData.getTaxonomyDir());
    runData.setTaxonomyReader(taxoReader);
    // We transfer reference to the run data
    taxoReader.decRef();
    return 1;
  }
}
View Full Code Here

Examples of org.apache.lucene.index.DirectoryReader.decRef()

        return _directory;
      }

      @Override
      public void close() throws IOException {
        reader.decRef();
      }
    };
  }

  @Override
View Full Code Here

Examples of org.apache.lucene.index.DirectoryReader.decRef()

    final DirectoryReader newIndexReader = writerHolder.openNRTIndexReader( flushDeletes );
    final DirectoryReader oldReader = currentReader.getAndSet( newIndexReader );
    this.currentReaderGen = openingGen;
    try {
      if ( oldReader != null ) {
        oldReader.decRef();
      }
    }
    catch (IOException e) {
      log.unableToCloseLuceneIndexReader( e );
    }
View Full Code Here

Examples of org.apache.lucene.index.DirectoryReader.decRef()

    final DirectoryReader newIndexReader = writerHolder.openNRTIndexReader( flushDeletes );
    final DirectoryReader oldReader = currentReader.getAndSet( newIndexReader );
    this.currentReaderGen = openingGen;
    try {
      if ( oldReader != null ) {
        oldReader.decRef();
      }
    }
    catch (IOException e) {
      log.unableToCloseLuceneIndexReader( e );
    }
View Full Code Here

Examples of org.apache.lucene.index.DirectoryReader.decRef()

  public int doLogic() throws IOException {
    DirectoryReader r = getRunData().getIndexReader();
    DirectoryReader nr = DirectoryReader.openIfChanged(r);
    if (nr != null) {
      getRunData().setIndexReader(nr);
      nr.decRef();
    }
    r.decRef();
    return 1;
  }
}
View Full Code Here

Examples of org.apache.lucene.index.DirectoryReader.decRef()

   
    long t = System.currentTimeMillis();
    DirectoryReader r = DirectoryReader.open(w, true);
    runData.setIndexReader(r);
    // Transfer our reference to runData
    r.decRef();

    // TODO: gather basic metrics for reporting -- eg mean,
    // stddev, min/max reopen latencies

    // Parent sequence sets stopNow
View Full Code Here

Examples of org.apache.lucene.index.DirectoryReader.decRef()

        }
        reopenTimes[reopenCount++] = delay;
        // TODO: somehow we need to enable warming, here
        runData.setIndexReader(newReader);
        // Transfer our reference to runData
        newReader.decRef();
        r = newReader;
      }
    }
    stopNow = false;
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.