@Override public Set<K> localKeySet(Predicate predicate) { return map.localKeySet(predicate); }
@Override public Set<K> localKeySet() { return map.localKeySet(); }
@Override public Integer getValue() { return map.localKeySet().size(); }
public int getKeyCount() { return keyCache.localKeySet().size(); }
public int getLocalPendingTaskMapSize() { return pendingTask.localKeySet().size(); }
public void run() { IMap map = hz.getMap("map"); boolean localKey = map.localKeySet().contains(key); System.out.println("Key " + key + " is local: " + localKey); } }
public void run() { IMap map = hazelcast.getMap("myMap"); Iterator it = map.localKeySet().iterator(); while (it.hasNext()) { it.next(); } } }, 10);
public void run() { IMap map = hazelcast.getMap("myMap"); Iterator it = map.localKeySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator(); while (it.hasNext()) { it.next(); } } }, 10);
public Integer call() throws Exception { IMap<String, Integer> map = hz.getMap("map"); int result = 0; for (String key : map.localKeySet()) { System.out.println("Calculating for key: " + key); result += map.get(key); } System.out.println("Local result: " + result); return result; } }
public void adjustTxCounter(long maxUsedId) { Set<Long> ids = new HashSet<>(txCache.localKeySet()); if (maxUsedId > 0) { ids.add(maxUsedId); } if (ids.size() > 0) { Long maxId = Collections.max(ids); boolean adjusted = txGen.adjust(maxId); logger.info("adjustTxCounter; found maxTxId: {}; adjusted: {}", maxId, adjusted); } }
protected void handleMapLocalKeys() { Set set = getMap().localKeySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; println(it.next()); } println("Total " + count); }
protected void handleMapLocalKeys() { Set set = getMap().localKeySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; println(it.next()); } println("Total " + count); }
protected void handleMapLocalKeys() { Set set = getMap().localKeySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; println(it.next()); } println("Total " + count); }
protected void handleMapLocalKeys() { Set set = getMap().localKeySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; println(it.next()); } println("Total " + count); }
protected void handleMapLocalSize() { println("Local Size = " + getMap().localKeySet().size()); }
protected void handleMapLocalSize() { println("Local Size = " + getMap().localKeySet().size()); }
public Collection<HazeltaskTask<GROUP>> getLocalPendingTasks(String predicate) { Set<UUID> keys = pendingTask.localKeySet(new SqlPredicate(predicate)); return pendingTask.getAll(keys).values(); }
protected void handleMapLocalSize() { println("Local Size = " + getMap().localKeySet().size()); }
protected void handleMapLocalSize() { println("Local Size = " + getMap().localKeySet().size()); }
@Prepare(global = true) public void prepare() { Random random = new Random(); Streamer<String, DataSerializableEmployee> streamer = StreamerFactory.getInstance(map); for (int i = 0; i < keyCount; i++) { String key = generateString(keyLength); DataSerializableEmployee value = generateRandomEmployee(random); streamer.pushEntry(key, value); } streamer.await(); logger.info("Map size is: " + map.size()); logger.info("Map localKeySet size is: " + map.localKeySet().size()); }