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

x33g5p2x  于2022-01-29 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(97)

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

QuorumConfig.getSize介绍

暂无

代码示例

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

QuorumImpl(QuorumConfig config, NodeEngineImpl nodeEngine) {
  this.nodeEngine = nodeEngine;
  this.eventService = nodeEngine.getEventService();
  this.config = config;
  this.quorumName = config.getName();
  this.size = config.getSize();
  this.quorumFunction = initializeQuorumFunction();
  this.heartbeatAwareQuorumFunction = (quorumFunction instanceof HeartbeatAware);
  this.membershipListenerQuorumFunction = (quorumFunction instanceof MembershipListener);
  this.pingAwareQuorumFunction = (quorumFunction instanceof PingAware);
}

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

QuorumImpl(QuorumConfig config, NodeEngineImpl nodeEngine) {
  this.nodeEngine = nodeEngine;
  this.eventService = nodeEngine.getEventService();
  this.config = config;
  this.quorumName = config.getName();
  this.size = config.getSize();
  this.quorumFunction = initializeQuorumFunction();
  this.heartbeatAwareQuorumFunction = (quorumFunction instanceof HeartbeatAware);
  this.membershipListenerQuorumFunction = (quorumFunction instanceof MembershipListener);
  this.pingAwareQuorumFunction = (quorumFunction instanceof PingAware);
}

代码示例来源:origin: com.hazelcast.simulator/tests-common

@Setup
@SuppressWarnings("unchecked")
public void setup() {
  this.lastClusterSizeChange = new LastClusterSizeChange(0L,
      getMemberCount());
  this.map = targetInstance.getMap(name);
  this.quorumCount = targetInstance.getConfig()
      .getQuorumConfig("map-quorum-ref").getSize();
}

代码示例来源:origin: com.hazelcast.simulator/tests-common

@Setup
@SuppressWarnings("unchecked")
public void setup() {
  CacheManager cacheManager = createCacheManager(targetInstance);
  cache = cacheManager.getCache(name);
  this.lastClusterSizeChange = new LastClusterSizeChange(0L,
      getMemberCount());
  this.quorumCount = targetInstance.getConfig()
      .getQuorumConfig("cache-quorum-ref").getSize();
}

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

quorumConfig.setQuorumFunctionClassName(value);
} else if ("recently-active-quorum".equals(nodeName)) {
  quorumConfigBuilder = handleRecentlyActiveQuorum(name, n, quorumConfig.getSize());
} else if ("probabilistic-quorum".equals(nodeName)) {
  quorumConfigBuilder = handleProbabilisticQuorum(name, n, quorumConfig.getSize());
constructedConfig.setSize(quorumConfig.getSize());
constructedConfig.setType(quorumConfig.getType());
constructedConfig.setListenerConfigs(quorumConfig.getListenerConfigs());

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

quorumConfig.setQuorumFunctionClassName(value);
} else if ("recently-active-quorum".equals(nodeName)) {
  quorumConfigBuilder = handleRecentlyActiveQuorum(name, n, quorumConfig.getSize());
} else if ("probabilistic-quorum".equals(nodeName)) {
  quorumConfigBuilder = handleProbabilisticQuorum(name, n, quorumConfig.getSize());
constructedConfig.setSize(quorumConfig.getSize());
constructedConfig.setType(quorumConfig.getType());
constructedConfig.setListenerConfigs(quorumConfig.getListenerConfigs());

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

private static void quorumXmlGenerator(XmlGenerator gen, Config config) {
  for (QuorumConfig quorumConfig : config.getQuorumConfigs().values()) {
    gen.open("quorum", "name", quorumConfig.getName(),
        "enabled", quorumConfig.isEnabled())
        .node("quorum-size", quorumConfig.getSize())
        .node("quorum-type", quorumConfig.getType());
    if (!quorumConfig.getListenerConfigs().isEmpty()) {
      gen.open("quorum-listeners");
      for (QuorumListenerConfig listenerConfig : quorumConfig.getListenerConfigs()) {
        gen.node("quorum-listener", classNameOrImplClass(listenerConfig.getClassName(),
            listenerConfig.getImplementation()));
      }
      gen.close();
    }
    handleQuorumFunction(gen, quorumConfig);
    gen.close();
  }
}

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

private static void quorumXmlGenerator(XmlGenerator gen, Config config) {
  for (QuorumConfig quorumConfig : config.getQuorumConfigs().values()) {
    gen.open("quorum", "name", quorumConfig.getName(),
        "enabled", quorumConfig.isEnabled())
        .node("quorum-size", quorumConfig.getSize())
        .node("quorum-type", quorumConfig.getType());
    if (!quorumConfig.getListenerConfigs().isEmpty()) {
      gen.open("quorum-listeners");
      for (QuorumListenerConfig listenerConfig : quorumConfig.getListenerConfigs()) {
        gen.node("quorum-listener", classNameOrImplClass(listenerConfig.getClassName(),
            listenerConfig.getImplementation()));
      }
      gen.close();
    }
    handleQuorumFunction(gen, quorumConfig);
    gen.close();
  }
}

相关文章