/** * not thread safe. should be properly lock. Right now we have two places to use it * and locked by the shutdown lock. If it gets more complicated, we should use separate * lock. */ private void clearCachedReaders() { List<ZoieMultiReader<R>> olist = list; returnIndexReaders(olist); list = null; lastupdate = 0; }
/** * not thread safe. should be properly lock. Right now we have two places to use it * and locked by the shutdown lock. If it gets more complicated, we should use separate * lock. */ private void clearCachedReaders() { List<ZoieMultiReader<R>> olist = list; returnIndexReaders(olist); list = null; lastupdate = 0; }
/** * not thread safe. should be properly lock. Right now we have two places to use it * and locked by the shutdown lock. If it gets more complicated, we should use separate * lock. */ private void clearCachedReaders() { List<ZoieIndexReader<R>> olist = list; returnIndexReaders(olist); list = null; lastupdate = 0; } private volatile long lastupdate=0;
/** * not thread safe. should be properly lock. Right now we have two places to use it * and locked by the shutdown lock. If it gets more complicated, we should use separate * lock. * @throws IOException */ private void updateCachedReaders() throws IOException { if (log.isDebugEnabled()) { log.debug("updating reader cache"); } List<ZoieMultiReader<R>> olist = list; returnIndexReaders(olist); if (log.isDebugEnabled()) { log.debug("getting new reader from reader cache"); } list = _readerMgr.getIndexReaders(); if (log.isDebugEnabled()) { log.debug("reader updated with size: " + list.size()); } lastupdate = System.currentTimeMillis(); }
/** * not thread safe. should be properly lock. Right now we have two places to use it * and locked by the shutdown lock. If it gets more complicated, we should use separate * lock. * @throws IOException */ private void updateCachedReaders() throws IOException { if (log.isDebugEnabled()) { log.debug("updating reader cache"); } List<ZoieMultiReader<R>> olist = list; returnIndexReaders(olist); if (log.isDebugEnabled()) { log.debug("getting new reader from reader cache"); } list = _readerMgr.getIndexReaders(); if (log.isDebugEnabled()) { log.debug("reader updated with size: " + list.size()); } lastupdate = System.currentTimeMillis(); }
/** * not thread safe. should be properly lock. Right now we have two places to use it * and locked by the shutdown lock. If it gets more complicated, we should use separate * lock. * @throws IOException */ private void updateCachedReaders() throws IOException { if (log.isDebugEnabled()){ log.debug("updating reader cache"); } List<ZoieIndexReader<R>> olist = list; returnIndexReaders(olist); if (log.isDebugEnabled()){ log.debug("getting new reader from reader cache"); } list = _readerMgr.getIndexReaders(); if (log.isDebugEnabled()){ log.debug("reader updated with size: "+list.size()); } lastupdate = System.currentTimeMillis(); } /**