Skip to content

Instantly share code, notes, and snippets.

@gurbuzali
Created March 24, 2017 20:23
Show Gist options
  • Save gurbuzali/09129fe9878199254344d55e1360baa2 to your computer and use it in GitHub Desktop.
Save gurbuzali/09129fe9878199254344d55e1360baa2 to your computer and use it in GitHub Desktop.
HazelcastInstance instance = Hazelcast.newHazelcastInstance();
IMap<Integer, Integer> map = instance.getMap("map");
IntStream.range(0, 90000).parallel().forEach(i -> map.put(i, i));
PagingPredicate<Integer, Integer> pagingPredicate = new PagingPredicate<>(100);
Set<Map.Entry<Integer, Integer>> entrySet = map.entrySet(pagingPredicate);
int count = 0;
for (Map.Entry<Integer, Integer> entry : entrySet) {
assertEquals(count++, entry.getKey());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment