com.hazelcast.config.Config.setCRDTReplicationConfig()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(143)

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

Config.setCRDTReplicationConfig介绍

[英]Sets the replication configuration for com.hazelcast.crdt.CRDTimplementations.
[中]设置com的复制配置。黑泽尔卡斯特。crdt。CRDT实现。

代码示例

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

private void handleCRDTReplication(Node root) {
  final CRDTReplicationConfig replicationConfig = new CRDTReplicationConfig();
  final String replicationPeriodMillisName = "replication-period-millis";
  final String maxConcurrentReplicationTargetsName = "max-concurrent-replication-targets";
  for (Node n : childElements(root)) {
    final String name = cleanNodeName(n);
    if (replicationPeriodMillisName.equals(name)) {
      replicationConfig.setReplicationPeriodMillis(
          getIntegerValue(replicationPeriodMillisName, getTextContent(n)));
    } else if (maxConcurrentReplicationTargetsName.equals(name)) {
      replicationConfig.setMaxConcurrentReplicationTargets(
          getIntegerValue(maxConcurrentReplicationTargetsName, getTextContent(n)));
    }
  }
  this.config.setCRDTReplicationConfig(replicationConfig);
}

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

private void handleCRDTReplication(Node root) {
  final CRDTReplicationConfig replicationConfig = new CRDTReplicationConfig();
  final String replicationPeriodMillisName = "replication-period-millis";
  final String maxConcurrentReplicationTargetsName = "max-concurrent-replication-targets";
  for (Node n : childElements(root)) {
    final String name = cleanNodeName(n);
    if (replicationPeriodMillisName.equals(name)) {
      replicationConfig.setReplicationPeriodMillis(
          getIntegerValue(replicationPeriodMillisName, getTextContent(n)));
    } else if (maxConcurrentReplicationTargetsName.equals(name)) {
      replicationConfig.setMaxConcurrentReplicationTargets(
          getIntegerValue(maxConcurrentReplicationTargetsName, getTextContent(n)));
    }
  }
  this.config.setCRDTReplicationConfig(replicationConfig);
}

相关文章

Config类方法