本文整理了Java中com.hazelcast.core.MultiMap.values()
方法的一些代码示例,展示了MultiMap.values()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.values()
方法的具体详情如下:
包路径:com.hazelcast.core.MultiMap
类名称:MultiMap
方法名:values
[英]Returns the collection of values in the multimap.
Warning: The collection is NOT backed by the map, so changes to the map are NOT reflected in the collection, and vice-versa.
[中]返回多重映射中的值集合。
警告:集合不受映射支持,因此对映射的更改不会反映在集合中,反之亦然。
代码示例来源:origin: spring-projects/spring-integration-extensions
private SocketAddress getNewAdminInstanceSocketAddress(
MultiMap<SocketAddress, SocketAddress> configMultiMap, SocketAddress removedMemberSocketAddress) {
for (SocketAddress socketAddress : configMultiMap.values()) {
if (!socketAddress.equals(removedMemberSocketAddress)) {
return socketAddress;
}
}
throw new IllegalStateException("No Active Hazelcast Instance Found.");
}
代码示例来源:origin: jclawson/hazeltask
public Collection<V> values() {
if(guavaMultiMap != null) {
synchronized (guavaMultiMap) {
Collection<V> c = guavaMultiMap.values();
if(c != null)
return new ArrayList<V>(c);
else
return null;
}
}
return hcMultiMap.values();
}
代码示例来源:origin: spring-projects/spring-integration-extensions
private boolean isEventComingFromNonRegisteredHazelcastInstance(
final HazelcastInstance hazelcastInstance,
final Set<SocketAddress> localSocketAddressesSet,
final InetSocketAddress socketAddressOfEvent) {
final MultiMap<SocketAddress, SocketAddress> configMultiMap = hazelcastInstance
.getMultiMap(HazelcastLocalInstanceRegistrar.SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP);
return configMultiMap.size() > 0
&& !configMultiMap.values().contains(socketAddressOfEvent)
&& localSocketAddressesSet.contains(configMultiMap.keySet().iterator().next());
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleMultiMapValues() {
Collection set = getMultiMap().values();
Iterator it = set.iterator();
int count = 0;
while (it.hasNext()) {
count++;
println(it.next());
}
println("Total " + count);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleMultiMapValues() {
Collection set = getMultiMap().values();
Iterator it = set.iterator();
int count = 0;
while (it.hasNext()) {
count++;
println(it.next());
}
println("Total " + count);
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleMultiMapValues() {
Collection set = getMultiMap().values();
Iterator it = set.iterator();
int count = 0;
while (it.hasNext()) {
count++;
println(it.next());
}
println("Total " + count);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleMultiMapValues() {
Collection set = getMultiMap().values();
Iterator it = set.iterator();
int count = 0;
while (it.hasNext()) {
count++;
println(it.next());
}
println("Total " + count);
}
代码示例来源:origin: spring-projects/spring-integration-extensions
SocketAddress newAdminSocketAddress = getNewAdminInstanceSocketAddress(
configMultiMap, removedMemberSocketAddress);
for (SocketAddress socketAddress : configMultiMap.values()) {
if (!socketAddress.equals(removedMemberSocketAddress)) {
configMultiMap.put(newAdminSocketAddress, socketAddress);
内容来源于网络,如有侵权,请联系作者删除!