本文整理了Java中com.hazelcast.core.MultiMap.addEntryListener()
方法的一些代码示例,展示了MultiMap.addEntryListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.addEntryListener()
方法的具体详情如下:
包路径:com.hazelcast.core.MultiMap
类名称:MultiMap
方法名:addEntryListener
[英]Adds the specified entry listener for the specified key.
The listener will be notified for all add/remove/update/evict events for the specified key only.
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.vert-x/vertx-core
public HazelcastSubsMap(VertxInternal vertx, com.hazelcast.core.MultiMap<String, HazelcastServerID> map) {
this.vertx = vertx;
this.map = map;
map.addEntryListener(this, true);
}
代码示例来源:origin: org.apache.camel/camel-hazelcast
public HazelcastMultimapConsumer(HazelcastInstance hazelcastInstance, Endpoint endpoint, Processor processor, String cacheName) {
super(hazelcastInstance, endpoint, processor, cacheName);
MultiMap<Object, Object> cache = hazelcastInstance.getMultiMap(cacheName);
cache.addEntryListener(new CamelEntryListener(this, cacheName), true);
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleAddListener(String[] args) {
String first = args[0];
if (first.startsWith("s.")) {
getSet().addItemListener(this, true);
} else if (first.startsWith("m.")) {
if (args.length > 1) {
getMap().addEntryListener(this, args[1], true);
} else {
getMap().addEntryListener(this, true);
}
} else if (first.startsWith("mm.")) {
if (args.length > 1) {
getMultiMap().addEntryListener(this, args[1], true);
} else {
getMultiMap().addEntryListener(this, true);
}
} else if (first.startsWith("q.")) {
getQueue().addItemListener(this, true);
} else if (first.startsWith("t.")) {
getTopic().addMessageListener(this);
} else if (first.startsWith("l.")) {
getList().addItemListener(this, true);
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
protected void handleAddListener(String[] args) {
String first = args[0];
if (first.startsWith("s.")) {
getSet().addItemListener(this, true);
} else if (first.startsWith("m.")) {
if (args.length > 1) {
getMap().addEntryListener(this, args[1], true);
} else {
getMap().addEntryListener(this, true);
}
} else if (first.startsWith("mm.")) {
if (args.length > 1) {
getMultiMap().addEntryListener(this, args[1], true);
} else {
getMultiMap().addEntryListener(this, true);
}
} else if (first.startsWith("q.")) {
getQueue().addItemListener(this, true);
} else if (first.startsWith("t.")) {
getTopic().addMessageListener(this);
} else if (first.startsWith("l.")) {
getList().addItemListener(this, true);
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleAddListener(String[] args) {
String first = args[0];
if (first.startsWith("s.")) {
getSet().addItemListener(this, true);
} else if (first.startsWith("m.")) {
if (args.length > 1) {
getMap().addEntryListener(this, args[1], true);
} else {
getMap().addEntryListener(this, true);
}
} else if (first.startsWith("mm.")) {
if (args.length > 1) {
getMultiMap().addEntryListener(this, args[1], true);
} else {
getMultiMap().addEntryListener(this, true);
}
} else if (first.startsWith("q.")) {
getQueue().addItemListener(this, true);
} else if (first.startsWith("t.")) {
getTopic().addMessageListener(this);
} else if (first.startsWith("l.")) {
getList().addItemListener(this, true);
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected void handleAddListener(String[] args) {
String first = args[0];
if (first.startsWith("s.")) {
getSet().addItemListener(this, true);
} else if (first.startsWith("m.")) {
if (args.length > 1) {
getMap().addEntryListener(this, args[1], true);
} else {
getMap().addEntryListener(this, true);
}
} else if (first.startsWith("mm.")) {
if (args.length > 1) {
getMultiMap().addEntryListener(this, args[1], true);
} else {
getMultiMap().addEntryListener(this, true);
}
} else if (first.startsWith("q.")) {
getQueue().addItemListener(this, true);
} else if (first.startsWith("t.")) {
getTopic().addMessageListener(this);
} else if (first.startsWith("l.")) {
getList().addItemListener(this, true);
}
}
代码示例来源:origin: spring-projects/spring-integration-extensions
.addEntryListener(new HazelcastEntryListener(), true));
内容来源于网络,如有侵权,请联系作者删除!