Examples of closeReader()


Examples of org.apache.oozie.util.TimestampedMessageParser.closeReader()

                }
            }
        }
        finally {
            for (TimestampedMessageParser parser : parsers) {
                parser.closeReader();
            }
            writer.flush();
        }
    }
}
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

  public void closeSearcher(Object query, SearchFactoryImplementor searchFactoryImplementor, IndexSearcher searcher) {
    Set<IndexReader> indexReaders = getIndexReaders( searcher );
    ReaderProvider readerProvider = searchFactoryImplementor.getReaderProvider();
    for ( IndexReader indexReader : indexReaders ) {
      try {
        readerProvider.closeReader( indexReader );
      }
      catch (SearchException e) {
        LOG.error("Cannot close Lucene Index Reader", e);
      }
    }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

      }
      catch ( IOException e ) {
        throw new RuntimeException( "Unable to execute count query for entity " + entity, e );
      }
      finally {
        readerProvider.closeReader( reader );
      }
    }
    return count;
  }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

      // database entry
      TopDocs topDocs = searcher.search( luceneQuery, null, 1 );
      assertTrue( "We should have no hit", topDocs.totalHits == 0 );
    }
    finally {
      readerProvider.closeReader( reader );
    }
    tx.commit();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

      // database entry
      TopDocs topDocs = searcher.search( luceneQuery, null, 1 );
      assertTrue( "We should have no hit", topDocs.totalHits == 0 );
    }
    finally {
      readerProvider.closeReader( reader );
    }
    tx.commit();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

      // database entry
      TopDocs topDocs = searcher.search( luceneQuery, null, 1 );
      assertTrue( "We should have no hit", topDocs.totalHits == 0 );
    }
    finally {
      readerProvider.closeReader( reader );
    }
    tx.commit();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

      }
      catch ( IOException e ) {
        throw new RuntimeException( "Unable to execute count query for entity " + entity, e );
      }
      finally {
        readerProvider.closeReader( reader );
      }
    }
    return count;
  }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

  public void closeSearcher(Object query, SearchFactoryImplementor searchFactoryImplementor) {
    Set<IndexReader> indexReaders = getIndexReaders( getSearcher() );
    ReaderProvider readerProvider = searchFactoryImplementor.getReaderProvider();
    for ( IndexReader indexReader : indexReaders ) {
      try {
        readerProvider.closeReader( indexReader );
      }
      catch (SearchException e) {
        //catch is inside the for loop to make sure we try to close all of them
        log.warn( "Unable to properly close searcher during lucene query: " + query.toString(), e );
      }
View Full Code Here

Examples of org.hibernate.search.reader.ReaderProvider.closeReader()

      }
      catch ( IOException e ) {
        throw new RuntimeException( "Unable to execute count query for entity " + entity, e );
      }
      finally {
        readerProvider.closeReader( reader );
      }
    }
    return count;
  }
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.