@Override public CacheHelper getReaderCacheHelper() { // MultiReader instances can be short-lived, which would make caching trappy // so we do not cache on them, unless they wrap a single reader in which // case we delegate if (getSequentialSubReaders().size() == 1) { return getSequentialSubReaders().get(0).getReaderCacheHelper(); } return null; }
@Override protected synchronized void doClose() throws IOException { IOException ioe = null; for (final IndexReader r : getSequentialSubReaders()) { try { if (closeSubReaders) { r.close(); } else { r.decRef(); } } catch (IOException e) { if (ioe == null) ioe = e; } } // throw the first exception if (ioe != null) throw ioe; } }
@Override public CacheHelper getReaderCacheHelper() { // MultiReader instances can be short-lived, which would make caching trappy // so we do not cache on them, unless they wrap a single reader in which // case we delegate if (getSequentialSubReaders().size() == 1) { return getSequentialSubReaders().get(0).getReaderCacheHelper(); } return null; }
@Override protected synchronized void doClose() throws IOException { IOException ioe = null; for (final IndexReader r : getSequentialSubReaders()) { try { if (closeSubReaders) { r.close(); } else { r.decRef(); } } catch (IOException e) { if (ioe == null) ioe = e; } } // throw the first exception if (ioe != null) throw ioe; } }
@Override protected synchronized void doClose() throws IOException { IOException ioe = null; for (final IndexReader r : getSequentialSubReaders()) { try { if (closeSubReaders) { r.close(); } else { r.decRef(); } } catch (IOException e) { if (ioe == null) ioe = e; } } // throw the first exception if (ioe != null) throw ioe; } }
@Override protected synchronized void doClose() throws IOException { IOException ioe = null; for (final IndexReader r : getSequentialSubReaders()) { try { if (closeSubReaders) { r.close(); } else { r.decRef(); } } catch (IOException e) { if (ioe == null) ioe = e; } } // throw the first exception if (ioe != null) throw ioe; } }