/** * @return a list that contains all the archived index directories excluding the one * currently accepting updates. */ public List<Directory> getAllArchivedDirectories() { @SuppressWarnings("unchecked") List<Directory> emptyList = Collections.EMPTY_LIST; ArrayList<Directory> list = new ArrayList<Directory>(); List<File> dirs = getAllArchivedDirs(); if (dirs != null) { for (File dir : dirs) { try { list.add(getFSDirectoryFromFile(dir)); } catch (IOException e) { log.error("potential index corruption: " + dir, e); } } } if (list.size() == 0) return emptyList; return list; }
/** * @return a list that contains all the archived index directories excluding the one * currently accepting updates. */ public List<Directory> getAllArchivedDirectories() { @SuppressWarnings("unchecked") List<Directory> emptyList = Collections.EMPTY_LIST; ArrayList<Directory> list = new ArrayList<Directory>(); List<File> dirs = getAllArchivedDirs(); if (dirs != null) { for (File dir : dirs) { try { list.add(getFSDirectoryFromFile(dir)); } catch (IOException e) { log.error("potential index corruption: " + dir, e); } } } if (list.size() == 0) return emptyList; return list; }
/** * @return a list that contains all the archived index directories excluding the one * currently accepting updates. */ public List<Directory> getAllArchivedDirectories() { @SuppressWarnings("unchecked") List<Directory> emptyList = Collections.EMPTY_LIST; ArrayList<Directory> list = new ArrayList<Directory>(); List<File> dirs = getAllArchivedDirs(); if (dirs != null) { for (File dir : dirs) { try { list.add(getFSDirectoryFromFile(dir)); } catch (IOException e) { log.error("potential index corruption: " + dir, e); } } } if (list.size()==0) return emptyList; return list; } /**
protected List<ZoieSystem<R, D>> loadArchiveZoies() { List<ZoieSystem<R, D>> archives = new ArrayList<ZoieSystem<R, D>>(); long t0 = System.currentTimeMillis(); List<File> dirs = _dirMgrFactory.getAllArchivedDirs(); for (File dir : dirs) { try { DirectoryManager dirMgr = new DefaultDirectoryManager(dir, _dirMgrFactory.getMode()); ZoieSystem<R, D> zoie = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zConfig); zoie.start(); archives.add(zoie); } catch (Exception e) { log.error("Load index: " + dir + " failed.", e); } } log.info("load " + dirs.size() + " archived indices of " + getSizeBytes() + " bytes in " + (System.currentTimeMillis() - t0) + "ms"); return archives; }
protected List<ZoieSystem<R, D>> loadArchiveZoies() { List<ZoieSystem<R, D>> archives = new ArrayList<ZoieSystem<R, D>>(); long t0 = System.currentTimeMillis(); List<File> dirs = _dirMgrFactory.getAllArchivedDirs(); for (File dir : dirs) { try { DirectoryManager dirMgr = new DefaultDirectoryManager(dir, _dirMgrFactory.getMode()); ZoieSystem<R, D> zoie = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zConfig); zoie.start(); archives.add(zoie); } catch (Exception e) { log.error("Load index: " + dir + " failed.", e); } } log.info("load " + dirs.size() + " archived indices of " + getSizeBytes() + " bytes in " + (System.currentTimeMillis() - t0) + "ms"); return archives; }
protected List<ZoieSystem<R, D>> loadArchiveZoies() { List<ZoieSystem<R, D>> archives = new ArrayList<ZoieSystem<R, D>>(); long t0 = System.currentTimeMillis(); List<File> dirs = _dirMgrFactory.getAllArchivedDirs(); for(File dir : dirs) { IndexReader reader; try { DirectoryManager dirMgr = new DefaultDirectoryManager(dir, _dirMgrFactory.getMode()); ZoieSystem<R, D> zoie = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zConfig); zoie.start(); archives.add(zoie); } catch (Exception e) { log.error("Load index: " + dir + " failed.", e); } } log.info("load "+dirs.size()+" archived indices of " + getSizeBytes() +" bytes in " + (System.currentTimeMillis() - t0) + "ms"); return archives; }