private void checkIfChanged() { try{ if (!searcherManager.isSearcherCurrent()) { searcherManager.maybeRefreshBlocking(); } }catch(IOException ex){ throw Throwables.propagate(ex); } }
public final boolean refreshNeeded() { if (store.tryIncRef()) { /* we need to inc the store here since searcherManager.isSearcherCurrent() acquires a searcher internally and that might keep a file open on the store. this violates the assumption that all files are closed when the store is closed so we need to make sure we increment it here */ try { return getSearcherManager().isSearcherCurrent() == false; } catch (IOException e) { logger.error("failed to access searcher manager", e); failEngine("failed to access searcher manager", e); throw new EngineException(shardId, "failed to access searcher manager", e); } finally { store.decRef(); } } return false; }
public final boolean refreshNeeded() { if (store.tryIncRef()) { /* we need to inc the store here since searcherManager.isSearcherCurrent() acquires a searcher internally and that might keep a file open on the store. this violates the assumption that all files are closed when the store is closed so we need to make sure we increment it here */ try { return !getSearcherManager().isSearcherCurrent(); } catch (IOException e) { logger.error("failed to access searcher manager", e); failEngine("failed to access searcher manager", e); throw new EngineException(shardId, "failed to access searcher manager", e); } finally { store.decRef(); } } return false; }