本文整理了Java中com.hazelcast.core.MultiMap.containsKey()
方法的一些代码示例,展示了MultiMap.containsKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.containsKey()
方法的具体详情如下:
包路径:com.hazelcast.core.MultiMap
类名称:MultiMap
方法名:containsKey
[英]Returns whether the multimap contains an entry with the key.
Warning: This method uses hashCode and equals of the binary form of the key, not the actual implementations of hashCode and equals defined in the key's class.
[中]返回多重映射是否包含带键的项。
警告:此方法使用密钥二进制形式的hashCode和equals,而不是密钥类中定义的hashCode和equals的实际实现。
代码示例来源:origin: org.apache.camel/camel-hazelcast
private void containsKey(Object oid, Exchange exchange) {
exchange.getOut().setBody(this.cache.containsKey(oid));
}
代码示例来源:origin: jclawson/hazeltask
public boolean containsKey(K key) {
if(guavaMultiMap != null)
return guavaMultiMap.containsKey(key);
return hcMultiMap.containsKey(key);
}
代码示例来源:origin: com.thinkaurelius.titan/titan-hazelcast
@Override
public boolean containsKey(StaticBuffer key, StoreTransaction txh) throws StorageException {
return cache.containsKey(key.as(StaticArrayBuffer.ARRAY_FACTORY));
}
代码示例来源:origin: spring-projects/spring-integration-extensions
.getMultiMap(HazelcastLocalInstanceRegistrar.SPRING_INTEGRATION_INTERNAL_CLUSTER_MULTIMAP);
if (configMultiMap.containsKey(removedMemberSocketAddress)) {
SocketAddress newAdminSocketAddress = getNewAdminInstanceSocketAddress(
configMultiMap, removedMemberSocketAddress);
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleContains(String[] args) {
String iteratorStr = args[0];
boolean key = lowerCaseInternal(iteratorStr).endsWith("key");
String data = args[1];
boolean result = false;
if (iteratorStr.startsWith("s.")) {
result = getSet().contains(data);
} else if (iteratorStr.startsWith("m.")) {
result = (key) ? getMap().containsKey(data) : getMap().containsValue(data);
} else if (iteratorStr.startsWith("mmm.")) {
result = (key) ? getMultiMap().containsKey(data) : getMultiMap().containsValue(data);
} else if (iteratorStr.startsWith("q.")) {
result = getQueue().contains(data);
} else if (iteratorStr.startsWith("l.")) {
result = getList().contains(data);
}
println("Contains: " + result);
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleContains(String[] args) {
String iteratorStr = args[0];
boolean key = lowerCaseInternal(iteratorStr).endsWith("key");
String data = args[1];
boolean result = false;
if (iteratorStr.startsWith("s.")) {
result = getSet().contains(data);
} else if (iteratorStr.startsWith("m.")) {
result = (key) ? getMap().containsKey(data) : getMap().containsValue(data);
} else if (iteratorStr.startsWith("mmm.")) {
result = (key) ? getMultiMap().containsKey(data) : getMultiMap().containsValue(data);
} else if (iteratorStr.startsWith("q.")) {
result = getQueue().contains(data);
} else if (iteratorStr.startsWith("l.")) {
result = getList().contains(data);
}
println("Contains: " + result);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleContains(String[] args) {
String iteratorStr = args[0];
boolean key = lowerCaseInternal(iteratorStr).endsWith("key");
String data = args[1];
boolean result = false;
if (iteratorStr.startsWith("s.")) {
result = getSet().contains(data);
} else if (iteratorStr.startsWith("m.")) {
result = (key) ? getMap().containsKey(data) : getMap().containsValue(data);
} else if (iteratorStr.startsWith("mmm.")) {
result = (key) ? getMultiMap().containsKey(data) : getMultiMap().containsValue(data);
} else if (iteratorStr.startsWith("q.")) {
result = getQueue().contains(data);
} else if (iteratorStr.startsWith("l.")) {
result = getList().contains(data);
}
println("Contains: " + result);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleContains(String[] args) {
String iteratorStr = args[0];
boolean key = lowerCaseInternal(iteratorStr).endsWith("key");
String data = args[1];
boolean result = false;
if (iteratorStr.startsWith("s.")) {
result = getSet().contains(data);
} else if (iteratorStr.startsWith("m.")) {
result = (key) ? getMap().containsKey(data) : getMap().containsValue(data);
} else if (iteratorStr.startsWith("mmm.")) {
result = (key) ? getMultiMap().containsKey(data) : getMultiMap().containsValue(data);
} else if (iteratorStr.startsWith("q.")) {
result = getQueue().contains(data);
} else if (iteratorStr.startsWith("l.")) {
result = getList().contains(data);
}
println("Contains: " + result);
}
内容来源于网络,如有侵权,请联系作者删除!