@Override public Set<String> keySet() { return getSessionRegion().keySetOnServer(); }
@Override public int size() { // Add a single dummy key to force the function to go to one server Set<String> filters = new HashSet<String>(); filters.add("test-key"); // Execute the function on the session region Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(filters); ResultCollector collector = execution.execute(RegionSizeFunction.ID); List<Integer> result = (List<Integer>) collector.getResult(); // Return the first (and only) element return result.get(0); }
Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(sessionIds); try { ResultCollector collector = execution.execute(TouchPartitionedRegionEntriesFunction.ID);
@Override public Set<String> keySet() { return getSessionRegion().keySetOnServer(); }
@Override public int size() { // Add a single dummy key to force the function to go to one server Set<String> filters = new HashSet<String>(); filters.add("test-key"); // Execute the function on the session region Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(filters); ResultCollector collector = execution.execute(RegionSizeFunction.ID, true, true, true); List<Integer> result = (List<Integer>) collector.getResult(); // Return the first (and only) element return result.get(0); }
Execution execution = FunctionService.onRegion(getSessionRegion()).withFilter(sessionIds); try { ResultCollector collector =