/** * @return true if the current index accepting updates is changed. * This method should be paired with clearRecentlyChanged() to clear the flag. * @see proj.zoie.hourglass.impl.HourglassDirectoryManagerFactory#clearRecentlyChanged() */ public boolean updateDirectoryManager() { Calendar now = Calendar.getInstance(); now.setTimeInMillis(System.currentTimeMillis()); if (now.before(_nextUpdateTime)) return false; String folderName; folderName = _scheduler.getFolderName(_nextUpdateTime); _location = new File(_root, folderName); try { log.info("rolling forward with new path: " + _location.getCanonicalPath()); } catch (IOException e) { log.error(e); } _currentDirMgr = new DefaultDirectoryManager(_location, _mode); isRecentlyChanged = true; setNextUpdateTime(); return isRecentlyChanged; }
/** * @return true if the current index accepting updates is changed. * This method should be paired with clearRecentlyChanged() to clear the flag. * @see proj.zoie.hourglass.impl.HourglassDirectoryManagerFactory#clearRecentlyChanged() */ public boolean updateDirectoryManager() { Calendar now = Calendar.getInstance(); now.setTimeInMillis(System.currentTimeMillis()); if (now.before(_nextUpdateTime)) return false; String folderName; folderName = _scheduler.getFolderName(_nextUpdateTime); _location = new File(_root, folderName); try { log.info("rolling forward with new path: " + _location.getCanonicalPath()); } catch (IOException e) { log.error(e); } _currentDirMgr = new DefaultDirectoryManager(_location, _mode); isRecentlyChanged = true; setNextUpdateTime(); return isRecentlyChanged; }
/** * @return true if the current index accepting updates is changed. * This method should be paired with clearRecentlyChanged() to clear the flag. * @see proj.zoie.hourglass.impl.HourglassDirectoryManagerFactory#clearRecentlyChanged() */ public boolean updateDirectoryManager() { Calendar now = Calendar.getInstance(); now.setTimeInMillis(System.currentTimeMillis()); if (now.before(_nextUpdateTime)) return false; String folderName; folderName = _scheduler.getFolderName(_nextUpdateTime); _location = new File(_root, folderName); try { log.info("rolling forward with new path: " + _location.getCanonicalPath()); } catch (IOException e) { log.error(e); } _currentDirMgr = new DefaultDirectoryManager(_location, _mode); isRecentlyChanged = true; setNextUpdateTime(); return isRecentlyChanged; } public boolean isRecentlyChanged()