本文整理了Java中com.hazelcast.config.Config.getManagedContext()
方法的一些代码示例,展示了Config.getManagedContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.getManagedContext()
方法的具体详情如下:
包路径:com.hazelcast.config.Config
类名称:Config
方法名:getManagedContext
[英]Returns the external managed context. This context is used to initialize user supplied objects.
[中]返回外部托管上下文。此上下文用于初始化用户提供的对象。
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public ManagedContext getManagedContext() {
return staticConfig.getManagedContext();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public ManagedContext getManagedContext() {
return staticConfig.getManagedContext();
}
代码示例来源:origin: com.hazelcast/hazelcast-all
this.lifecycleService = new LifecycleServiceImpl(this);
ManagedContext configuredManagedContext = config.getManagedContext();
this.managedContext = new HazelcastManagedContext(this, configuredManagedContext);
代码示例来源:origin: hazelcast/hazelcast-jet
this.lifecycleService = new LifecycleServiceImpl(this);
ManagedContext configuredManagedContext = config.getManagedContext();
this.managedContext = new HazelcastManagedContext(this, configuredManagedContext);
代码示例来源:origin: hazelcast/hazelcast-jet
private void assertHazelcastConfig(Config cfg) {
assertTrue(cfg.getManagedContext() instanceof SpringManagedContext);
assertEquals("jet-spring", cfg.getGroupConfig().getName());
assertEquals("jet-spring-pass", cfg.getGroupConfig().getPassword());
NetworkConfig networkConfig = cfg.getNetworkConfig();
assertEquals(5707, networkConfig.getPort());
assertFalse(networkConfig.isPortAutoIncrement());
JoinConfig join = networkConfig.getJoin();
assertFalse(join.getMulticastConfig().isEnabled());
TcpIpConfig tcpIpConfig = join.getTcpIpConfig();
assertTrue(tcpIpConfig.isEnabled());
List<String> members = tcpIpConfig.getMembers();
assertEquals(1, members.size());
assertEquals("127.0.0.1:5707", members.get(0));
assertEquals(3, cfg.getMapConfig("map").getBackupCount());
}
}
内容来源于网络,如有侵权,请联系作者删除!