com.hazelcast.instance.Node.getDiscoveryService()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(246)

本文整理了Java中com.hazelcast.instance.Node.getDiscoveryService()方法的一些代码示例,展示了Node.getDiscoveryService()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getDiscoveryService()方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:getDiscoveryService

Node.getDiscoveryService介绍

暂无

代码示例

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. public PartitionStateManager(Node node, InternalPartitionServiceImpl partitionService, PartitionListener listener) {
  2. this.node = node;
  3. this.logger = node.getLogger(getClass());
  4. this.partitionService = partitionService;
  5. partitionCount = partitionService.getPartitionCount();
  6. this.partitions = new InternalPartitionImpl[partitionCount];
  7. Address thisAddress = node.getThisAddress();
  8. for (int i = 0; i < partitionCount; i++) {
  9. this.partitions[i] = new InternalPartitionImpl(i, listener, thisAddress);
  10. }
  11. memberGroupFactory = MemberGroupFactoryFactory.newMemberGroupFactory(node.getConfig().getPartitionGroupConfig(),
  12. node.getDiscoveryService());
  13. partitionStateGenerator = new PartitionStateGeneratorImpl();
  14. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. public PartitionStateManager(Node node, InternalPartitionServiceImpl partitionService, PartitionListener listener) {
  2. this.node = node;
  3. this.logger = node.getLogger(getClass());
  4. this.partitionService = partitionService;
  5. this.partitionCount = partitionService.getPartitionCount();
  6. this.partitions = new InternalPartitionImpl[partitionCount];
  7. PartitionReplica localReplica = PartitionReplica.from(node.getLocalMember());
  8. for (int i = 0; i < partitionCount; i++) {
  9. this.partitions[i] = new InternalPartitionImpl(i, listener, localReplica);
  10. }
  11. memberGroupFactory = MemberGroupFactoryFactory.newMemberGroupFactory(node.getConfig().getPartitionGroupConfig(),
  12. node.getDiscoveryService());
  13. partitionStateGenerator = new PartitionStateGeneratorImpl();
  14. }

相关文章