本文整理了Java中com.hazelcast.core.MultiMap.size()
方法的一些代码示例,展示了MultiMap.size()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.size()
方法的具体详情如下:
包路径:com.hazelcast.core.MultiMap
类名称:MultiMap
方法名:size
[英]Returns the number of key-value pairs in the multimap.
[中]返回多重映射中的键值对数。
代码示例来源:origin: jclawson/hazeltask
public int size() {
if(guavaMultiMap != null)
return guavaMultiMap.size();
return hcMultiMap.size();
}
代码示例来源:origin: hazelcast/hazelcast-jet
@ManagedAnnotation("size")
public int getSize() {
return managedObject.size();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@ManagedAnnotation("size")
public int getSize() {
return managedObject.size();
}
代码示例来源: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 handleSize(String[] args) {
int size = 0;
String iteratorStr = args[0];
if (iteratorStr.startsWith("s.")) {
size = getSet().size();
} else if (iteratorStr.startsWith("m.")) {
size = getMap().size();
} else if (iteratorStr.startsWith("mm.")) {
size = getMultiMap().size();
} else if (iteratorStr.startsWith("q.")) {
size = getQueue().size();
} else if (iteratorStr.startsWith("l.")) {
size = getList().size();
}
println("Size = " + size);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleSize(String[] args) {
int size = 0;
String iteratorStr = args[0];
if (iteratorStr.startsWith("s.")) {
size = getSet().size();
} else if (iteratorStr.startsWith("m.")) {
size = getMap().size();
} else if (iteratorStr.startsWith("mm.")) {
size = getMultiMap().size();
} else if (iteratorStr.startsWith("q.")) {
size = getQueue().size();
} else if (iteratorStr.startsWith("l.")) {
size = getList().size();
}
println("Size = " + size);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleSize(String[] args) {
int size = 0;
String iteratorStr = args[0];
if (iteratorStr.startsWith("s.")) {
size = getSet().size();
} else if (iteratorStr.startsWith("m.")) {
size = getMap().size();
} else if (iteratorStr.startsWith("mm.")) {
size = getMultiMap().size();
} else if (iteratorStr.startsWith("q.")) {
size = getQueue().size();
} else if (iteratorStr.startsWith("l.")) {
size = getList().size();
}
println("Size: " + size);
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleSize(String[] args) {
int size = 0;
String iteratorStr = args[0];
if (iteratorStr.startsWith("s.")) {
size = getSet().size();
} else if (iteratorStr.startsWith("m.")) {
size = getMap().size();
} else if (iteratorStr.startsWith("mm.")) {
size = getMultiMap().size();
} else if (iteratorStr.startsWith("q.")) {
size = getQueue().size();
} else if (iteratorStr.startsWith("l.")) {
size = getList().size();
}
println("Size: " + size);
}
代码示例来源:origin: spring-projects/spring-integration-extensions
private void syncConfigurationMultiMap(HazelcastInstance hazelcastInstance) {
Lock lock = hazelcastInstance.getLock(SPRING_INTEGRATION_INTERNAL_CLUSTER_LOCK);
lock.lock();
try {
MultiMap<SocketAddress, SocketAddress> multiMap = hazelcastInstance
.getMultiMap(SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP);
for (HazelcastInstance localInstance : Hazelcast.getAllHazelcastInstances()) {
SocketAddress localInstanceSocketAddress = localInstance.getLocalEndpoint().getSocketAddress();
if (multiMap.size() == 0) {
multiMap.put(localInstanceSocketAddress, localInstanceSocketAddress);
}
else {
multiMap.put(multiMap.keySet().iterator().next(), localInstanceSocketAddress);
}
}
}
finally {
lock.unlock();
}
}
代码示例来源:origin: spring-projects/spring-integration-extensions
private static void verifyMultiMapForPayload(
final MultiMap<Integer, HazelcastIntegrationTestUser> multiMap) {
int index = 1;
assertNotNull(multiMap);
assertEquals(true, multiMap.size() == DATA_COUNT);
SortedSet<Integer> keys = new TreeSet<>(multiMap.keySet());
for (Integer key : keys) {
assertNotNull(key);
assertEquals(index, key.intValue());
HazelcastIntegrationTestUser user = multiMap.get(key).iterator().next();
verifyHazelcastIntegrationTestUser(user, index);
index++;
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
public void start(String[] args) {
getMap().size();
getList().size();
getSet().size();
getQueue().size();
getMultiMap().size();
if (lineReader == null) {
lineReader = new DefaultLineReader();
}
running = true;
while (running) {
print("hazelcast[" + namespace + "] > ");
try {
final String command = lineReader.readLine();
handleCommand(command);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
public void start(String[] args) {
getMap().size();
getList().size();
getSet().size();
getQueue().size();
getMultiMap().size();
if (lineReader == null) {
lineReader = new DefaultLineReader();
}
running = true;
while (running) {
print("hazelcast[" + namespace + "] > ");
try {
final String command = lineReader.readLine();
handleCommand(command);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
public void start() throws Exception {
getMap().size();
getList().size();
getSet().size();
getQueue().size();
getTopic().getLocalTopicStats();
getMultiMap().size();
hazelcast.getExecutorService("default").getLocalExecutorStats();
for (int i = 1; i <= LOAD_EXECUTORS_COUNT; i++) {
hazelcast.getExecutorService(EXECUTOR_NAMESPACE + " " + i).getLocalExecutorStats();
}
if (lineReader == null) {
lineReader = new DefaultLineReader();
}
running = true;
while (running) {
print("hazelcast[" + namespace + "] > ");
try {
final String command = lineReader.readLine();
handleCommand(command);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
public void start() throws Exception {
getMap().size();
getList().size();
getSet().size();
getQueue().size();
getTopic().getLocalTopicStats();
getMultiMap().size();
hazelcast.getExecutorService("default").getLocalExecutorStats();
for (int i = 1; i <= LOAD_EXECUTORS_COUNT; i++) {
hazelcast.getExecutorService(EXECUTOR_NAMESPACE + " " + i).getLocalExecutorStats();
}
if (lineReader == null) {
lineReader = new DefaultLineReader();
}
running = true;
while (running) {
print("hazelcast[" + namespace + "] > ");
try {
final String command = lineReader.readLine();
handleCommand(command);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!