@Override protected void mapOperation() { map.entrySet(); } }
@Override public Set<Entry<Object, StreamEvent>> entrySet() { return candidateDataMap.entrySet(); } }
@Override public Set<Entry<K, V>> entrySet() { return delegate.entrySet(); } }
@Override public Set<Entry<K, V>> entrySet(Predicate predicate) { return map.entrySet(predicate); }
public void run() { IMap map = hazelcast.getMap("myMap"); Iterator it = map.entrySet().iterator(); for (int i = 0; i < 10 && it.hasNext(); i++) { it.next(); } } }, 1);
public void run() { IMap map = hazelcast.getMap("myMap"); Iterator it = map.entrySet(new SqlPredicate("year=" + random.nextInt(100))).iterator(); while (it.hasNext()) { it.next(); } } }, 1);
public void run() { IMap map = hazelcast.getMap("myMap"); Iterator it = map.entrySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator(); while (it.hasNext()) { it.next(); } } }, 10);
private void maybeUpdateMapContainers() { for (Map.Entry<String, CacheSettings> entry : mapSettings.entrySet()) { configureMap(entry.getKey(), entry.getValue()); } }
/** * Returns the collection of exported job state snapshots stored in the * cluster. */ @Nonnull default Collection<JobStateSnapshot> getJobStateSnapshots() { return getHazelcastInstance().getMap(JobRepository.EXPORTED_SNAPSHOTS_DETAIL_CACHE) .entrySet().stream() .map(entry -> new JobStateSnapshot(this, (String) entry.getKey(), (SnapshotValidationRecord) entry.getValue())) .collect(toList()); }
@TimeStep public void timeStep(ThreadState state) throws Exception { long startTime = System.nanoTime(); Set<Map.Entry<String, ComplexDomainObject>> entries = map.entrySet(state.predicate); long durationNanos = System.nanoTime() - startTime; long durationMillis = NANOSECONDS.toMillis(durationNanos); throttlingLogger.log(INFO, "Query Evaluation Took " + durationMillis + "ms. Size of the result size: " + entries.size()); }
protected void handleMapEntries() { Set set = getMap().entrySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; Map.Entry entry = (Entry) it.next(); println(entry.getKey() + ": " + entry.getValue()); } println("Total " + count); }
protected void handleMapEntries() { Set set = getMap().entrySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; Entry entry = (Entry) it.next(); println(entry.getKey() + ": " + entry.getValue()); } println("Total " + count); }
protected void handleMapEntries() { Set set = getMap().entrySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; Map.Entry entry = (Entry) it.next(); println(entry.getKey() + ": " + entry.getValue()); } println("Total " + count); }
protected void handleMapEntries() { Set set = getMap().entrySet(); Iterator it = set.iterator(); int count = 0; while (it.hasNext()) { count++; Entry entry = (Entry) it.next(); println(entry.getKey() + ": " + entry.getValue()); } println("Total " + count); }
@Override public CloseableIterator<Map.Entry<Object, Object>> entries(String keyspace) { Iterator<Entry<Object, Object>> iterator = this.getMap(keyspace).entrySet().iterator(); return new ForwardingCloseableIterator<>(iterator); } }
@Override protected Set<Map.Entry<String, Path>> getTypedPathWithRegex(String regex, String root) { regex = regex.replaceAll("\\{", Matcher.quoteReplacement("\\{")); regex = regex.replaceAll("\\}", Matcher.quoteReplacement("\\}")); Predicate<String, Path> filter = new RegexPredicate("path", regex); if (root != null) { filter = Predicates.and(filter, Predicates.equal("root", root)); } Set<Map.Entry<String, Path>> entries = pathCache.entrySet(filter); return entries; }
@RequestMapping(value = "/_all", method = RequestMethod.GET) public ResponseEntity<ResponseDto> getTopics(@PageableDefault Pageable pageable) { try { ResponseDto responseDto = new ResponseDto(); responseDto.setTopics(topicsMap.entrySet()); responseDto.setOperations(operationsMap.entrySet()); return new ResponseEntity<>(responseDto, HttpStatus.OK); } catch (Exception e) { log.error(e.getMessage(), e); return ResponseEntity.status(500).build(); } }
@TimeStep(prob = 1) public void getByStringIndex(ThreadState state) { String string = state.getUniqueString(); Predicate predicate = Predicates.equal("stringVal", string); Set<Map.Entry<String, DomainObject>> entries = map.entrySet(predicate); throttlingLogger.log(Level.INFO, "GetByStringIndex: " + entries.size() + " entries"); }
public static void main(String[] args) { HazelcastInstance hz = Hazelcast.newHazelcastInstance(); IMap<String, Employee> employees = hz.getMap("employees"); employees.put("John", new Employee(1000)); employees.put("Mark", new Employee(1000)); employees.put("Spencer", new Employee(1000)); employees.executeOnEntries(new EmployeeRaiseEntryProcessor()); for (Map.Entry<String, Employee> entry : employees.entrySet()) { System.out.println(entry.getKey() + " salary: " + entry.getValue().getSalary()); } Hazelcast.shutdownAll(); }