Java 类com.hazelcast.config.SetConfig 实例源码

项目:runrightfast-vertx    文件:TypesafeHazelcastConfig.java   
private SetConfig getSetConfig(final com.typesafe.config.Config c) {
    final SetConfig setConfig = new SetConfig();
    setConfig.setName(ConfigUtils.getString(c, "name").orElseThrow(new ConfigurationExceptionSupplier("name is required")));
    ConfigUtils.getInt(c, "backup-count").ifPresent(setConfig::setBackupCount);
    ConfigUtils.getInt(c, "async-backup-count").ifPresent(setConfig::setAsyncBackupCount);
    ConfigUtils.getInt(c, "max-size").ifPresent(setConfig::setMaxSize);
    ConfigUtils.getBoolean(c, "statistics-enabled").ifPresent(setConfig::setStatisticsEnabled);
    return setConfig;
}
项目:microservices-sample    文件:HazelcastBuilder.java   
public HazelcastInstance build() {
    Config config = new Config();
    if (listener != null) {
        SetConfig setConfig = new SetConfig();
        setConfig.setName(PUBLISHED_SERVICES);
        setConfig.addItemListenerConfig(new ItemListenerConfig(listener, true));
        config.addSetConfig(setConfig);
    }
    config.setInstanceName(UUID.randomUUID().toString());

    return Hazelcast.newHazelcastInstance(config);
}
项目:hazelcast-modules    文件:TreeSetContainer.java   
@Override
protected SetConfig getConfig() {
    if (config == null) {
        config = nodeEngine.getConfig().findSetConfig(name);
    }
    return config;
}