/** * Return all feedbackstores for a single storeId. * * @param storeId * the storeId * @return a list of all feedbackstores for this storeId */ private FeedbackStore[] getAllStores(long storeId) throws IOException { List<FeedbackStore> stores = new ArrayList<>(); SortedSet<Integer> storeFileNos = m_storeFileIdx.get(storeId); FeedbackStore currentStore = getCurrentStore(); if (currentStore.getId() == storeId) { // The last one is the current store... storeFileNos = storeFileNos.headSet(storeFileNos.last()); } for (Integer fileNo : storeFileNos) { stores.add(createStore(storeId, fileNo)); } if (currentStore.getId() == storeId) { stores.add(currentStore); } return stores.toArray(new FeedbackStore[stores.size()]); }
/** * Return the feedbackstore for the specified storeId. If there are multiple files for this storeId the last one is * returned * * @param the * storeId * @return the feedbackstore for that storeID */ private FeedbackStore getLastStore(long storeID) throws IOException { FeedbackStore currentStore = getCurrentStore(); if (currentStore != null && currentStore.getId() == storeID) { return currentStore; } int lastFileNo = getLastLogfileNumber(storeID); return createStore(storeID, lastFileNo); }
long storeID = currentStore.getId();