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

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

本文整理了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

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();
}

相关文章

微信公众号

最新文章

更多