本文整理了Java中com.hazelcast.config.Config.addListenerConfig()
方法的一些代码示例,展示了Config.addListenerConfig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.addListenerConfig()
方法的具体详情如下:
包路径:com.hazelcast.config.Config
类名称:Config
方法名:addListenerConfig
[英]Adds a configuration for an EventListener. This includes listeners for events related to this instance/member or the cluster, such as partition, migration, cluster version listeners, etc. but not listeners on specific distributed data structures.
[中]添加EventListener的配置。这包括与此实例/成员或集群相关的事件的侦听器,如分区、迁移、集群版本侦听器等,但不包括特定分布式数据结构上的侦听器。
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public Config addListenerConfig(ListenerConfig listenerConfig) {
return staticConfig.addListenerConfig(listenerConfig);
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public Config addListenerConfig(ListenerConfig listenerConfig) {
return staticConfig.addListenerConfig(listenerConfig);
}
代码示例来源:origin: hazelcast/hazelcast-jet
private void handleListeners(Node node) {
for (Node child : childElements(node)) {
if ("listener".equals(cleanNodeName(child))) {
String listenerClass = getTextContent(child);
config.addListenerConfig(new ListenerConfig(listenerClass));
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private void handleListeners(Node node) {
for (Node child : childElements(node)) {
if ("listener".equals(cleanNodeName(child))) {
String listenerClass = getTextContent(child);
config.addListenerConfig(new ListenerConfig(listenerClass));
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-wm
private static HazelcastInstance createInstance(ClusteredSessionService sessionService, WebFilterConfig filterConfig)
throws ServletException {
LOGGER.info("Creating a new HazelcastInstance for session replication");
Config config;
if (filterConfig.getConfigUrl() == null) {
config = new XmlConfigBuilder().build();
} else {
try {
config = new UrlXmlConfig(filterConfig.getConfigUrl());
} catch (IOException e) {
throw new ServletException(e);
}
}
config.getMapConfig(filterConfig.getMapName()).setMaxIdleSeconds(filterConfig.getSessionTtlSeconds());
config.addListenerConfig(new ListenerConfig(new ServerLifecycleListener(sessionService)));
return Hazelcast.newHazelcastInstance(config);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private static HazelcastInstance createInstance(ClusteredSessionService sessionService, WebFilterConfig filterConfig)
throws ServletException {
LOGGER.info("Creating a new HazelcastInstance for session replication");
Config config;
if (filterConfig.getConfigUrl() == null) {
config = new XmlConfigBuilder().build();
} else {
try {
config = new UrlXmlConfig(filterConfig.getConfigUrl());
} catch (IOException e) {
throw new ServletException(e);
}
}
config.getMapConfig(filterConfig.getMapName()).setMaxIdleSeconds(filterConfig.getSessionTtlSeconds());
config.addListenerConfig(new ListenerConfig(new ServerLifecycleListener(sessionService)));
return Hazelcast.newHazelcastInstance(config);
}
内容来源于网络,如有侵权,请联系作者删除!