protected static void appendInterestResponseKeys(LocalRegion region, Object riKey, Collection entryKeys, ArrayList collector, String riDescr, ServerConnection servConn) throws IOException { for (Iterator it = entryKeys.iterator(); it.hasNext();) { appendInterestResponseKey(region, riKey, it.next(), collector, riDescr, servConn); } }
protected static void appendInterestResponseKeys(LocalRegion region, Object riKey, Collection entryKeys, ArrayList collector, String riDescr, ServerConnection servConn) throws IOException { for (Iterator it = entryKeys.iterator(); it.hasNext();) { appendInterestResponseKey(region, riKey, it.next(), collector, riDescr, servConn); } } }
/** * Process an interest request of type ALL_KEYS * * @param region * the region * @param policy * the policy * @throws IOException */ private static void handleAllKeys(LocalRegion region, InterestResultPolicy policy, ServerConnection servConn) throws IOException { ArrayList keyList = new ArrayList(maximumChunkSize); if (region != null) { for (Iterator it = region.keySet(sendTombstonesInRIResults(servConn, policy)).iterator(); it.hasNext();) { appendInterestResponseKey(region, "ALL_KEYS", it.next(), keyList, "ALL_KEYS", servConn); } } // Send the last chunk (the only chunk for individual and list keys) // always send it back, even if the list is of zero size. sendRegisterInterestResponseChunk(region, "ALL_KEYS", keyList, true, servConn); }
/** * Process an interest request of type ALL_KEYS * * @param region * the region * @param policy * the policy * @throws IOException */ private static void handleAllKeys(LocalRegion region, InterestResultPolicy policy, ServerConnection servConn) throws IOException { ArrayList keyList = new ArrayList(maximumChunkSize); if (region != null) { for (Iterator it = region.keySet(sendTombstonesInRIResults(servConn, policy)).iterator(); it.hasNext();) { appendInterestResponseKey(region, "ALL_KEYS", it.next(), keyList, "ALL_KEYS", servConn); } } // Send the last chunk (the only chunk for individual and list keys) // always send it back, even if the list is of zero size. sendRegisterInterestResponseChunk(region, "ALL_KEYS", keyList, true, servConn); }
appendInterestResponseKey(region, regex, entryKey, keyList, "regex", servConn);
appendInterestResponseKey(region, regex, entryKey, keyList, "regex", servConn);
|| (sendTombstonesInRIResults(servConn, policy) && region.containsTombstone(entryKey))) { appendInterestResponseKey(region, keyList, entryKey, newKeyList, "list", servConn);
|| (sendTombstonesInRIResults(servConn, policy) && region.containsTombstone(entryKey))) { appendInterestResponseKey(region, keyList, entryKey, newKeyList, "list", servConn);
/** * Process an interest request consisting of a single key * * @param region * the region * @param entryKey * the key * @param policy * the policy * @throws IOException */ private static void handleSingleton(LocalRegion region, Object entryKey, InterestResultPolicy policy, ServerConnection servConn) throws IOException { ArrayList keyList = new ArrayList(1); if (region != null) { if (region.containsKey(entryKey) || (sendTombstonesInRIResults(servConn, policy) && region.containsTombstone(entryKey))) { appendInterestResponseKey(region, entryKey, entryKey, keyList, "individual", servConn); } } // Send the last chunk (the only chunk for individual and list keys) // always send it back, even if the list is of zero size. sendRegisterInterestResponseChunk(region, entryKey, keyList, true, servConn); }
/** * Process an interest request consisting of a single key * * @param region * the region * @param entryKey * the key * @param policy * the policy * @throws IOException */ private static void handleSingleton(LocalRegion region, Object entryKey, InterestResultPolicy policy, ServerConnection servConn) throws IOException { ArrayList keyList = new ArrayList(1); if (region != null) { if (region.containsKey(entryKey) || (sendTombstonesInRIResults(servConn, policy) && region.containsTombstone(entryKey))) { appendInterestResponseKey(region, entryKey, entryKey, keyList, "individual", servConn); } } // Send the last chunk (the only chunk for individual and list keys) // always send it back, even if the list is of zero size. sendRegisterInterestResponseChunk(region, entryKey, keyList, true, servConn); }