public void addSingleInterest(LocalRegion r, Object key, int interestType, InterestResultPolicy pol, boolean isDurable, boolean receiveUpdatesAsInvalidates) { RegionInterestEntry rie = getRegionInterests(r, interestType, false, isDurable, receiveUpdatesAsInvalidates); rie.getInterests().put(key, pol); }
public void addInterestList(LocalRegion r, List keys, InterestResultPolicy pol, boolean isDurable, boolean receiveUpdatesAsInvalidates) { RegionInterestEntry rie = getRegionInterests(r, InterestType.KEY, false, isDurable, receiveUpdatesAsInvalidates); for (int i = 0; i < keys.size(); i++) { rie.getInterests().put(keys.get(i), pol); } }
public boolean removeSingleInterest(LocalRegion r, Object key, int interestType, boolean isDurable, boolean receiveUpdatesAsInvalidates) { RegionInterestEntry rie = getRegionInterests(r, interestType, true, isDurable, receiveUpdatesAsInvalidates); if (rie == null) { return false; } if (logger.isDebugEnabled()) { logger.debug("removeSingleInterest region={} key={}", r.getFullPath(), key); } Object interest = rie.getInterests().remove(key); if (interest == null) { logger.warn("removeSingleInterest: key {} not registered in the client", key); return false; } else { return true; } }
public boolean removeInterestList(LocalRegion r, List keys, boolean isDurable, boolean receiveUpdatesAsInvalidates) { RegionInterestEntry rie = getRegionInterests(r, InterestType.KEY, true, isDurable, receiveUpdatesAsInvalidates); if (rie == null) { return false; } if (logger.isDebugEnabled()) { logger.debug("removeInterestList region={} keys={}", r.getFullPath(), keys); } int removeCount = 0; for (int i = 0; i < keys.size(); i++) { Object key = keys.get(i); Object interest = rie.getInterests().remove(key); if (interest != null) { removeCount++; } else { logger.warn("removeInterestList: key {} not registered in the client", key); } } return removeCount != 0; }