本文整理了Java中com.hazelcast.instance.Node.getDiscoveryService()
方法的一些代码示例,展示了Node.getDiscoveryService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getDiscoveryService()
方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:getDiscoveryService
暂无
代码示例来源:origin: com.hazelcast/hazelcast-all
public PartitionStateManager(Node node, InternalPartitionServiceImpl partitionService, PartitionListener listener) {
this.node = node;
this.logger = node.getLogger(getClass());
this.partitionService = partitionService;
partitionCount = partitionService.getPartitionCount();
this.partitions = new InternalPartitionImpl[partitionCount];
Address thisAddress = node.getThisAddress();
for (int i = 0; i < partitionCount; i++) {
this.partitions[i] = new InternalPartitionImpl(i, listener, thisAddress);
}
memberGroupFactory = MemberGroupFactoryFactory.newMemberGroupFactory(node.getConfig().getPartitionGroupConfig(),
node.getDiscoveryService());
partitionStateGenerator = new PartitionStateGeneratorImpl();
}
代码示例来源:origin: hazelcast/hazelcast-jet
public PartitionStateManager(Node node, InternalPartitionServiceImpl partitionService, PartitionListener listener) {
this.node = node;
this.logger = node.getLogger(getClass());
this.partitionService = partitionService;
this.partitionCount = partitionService.getPartitionCount();
this.partitions = new InternalPartitionImpl[partitionCount];
PartitionReplica localReplica = PartitionReplica.from(node.getLocalMember());
for (int i = 0; i < partitionCount; i++) {
this.partitions[i] = new InternalPartitionImpl(i, listener, localReplica);
}
memberGroupFactory = MemberGroupFactoryFactory.newMemberGroupFactory(node.getConfig().getPartitionGroupConfig(),
node.getDiscoveryService());
partitionStateGenerator = new PartitionStateGeneratorImpl();
}
内容来源于网络,如有侵权,请联系作者删除!