Examples of ClusterConfiguration


Examples of org.apache.helix.model.ClusterConfiguration

    // read the pause status
    PauseSignal pauseSignal = _accessor.getProperty(_keyBuilder.pause());
    boolean isPaused = pauseSignal != null;

    ClusterConfiguration clusterConfig = _accessor.getProperty(_keyBuilder.clusterConfig());
    boolean autoJoinAllowed = false;
    UserConfig userConfig;
    if (clusterConfig != null) {
      userConfig = clusterConfig.getUserConfig();
      autoJoinAllowed = clusterConfig.autoJoinAllowed();
    } else {
      userConfig = new UserConfig(Scope.cluster(_clusterId));
    }

    // read the state model definitions
View Full Code Here

Examples of org.apache.helix.model.ClusterConfiguration

  /**
   * Read the user config of the cluster
   * @return UserConfig, or null
   */
  public UserConfig readUserConfig() {
    ClusterConfiguration clusterConfig = _accessor.getProperty(_keyBuilder.clusterConfig());
    return clusterConfig != null ? clusterConfig.getUserConfig() : null;
  }
View Full Code Here

Examples of org.apache.helix.model.ClusterConfiguration

   * the same key
   * @param userConfig the user config key-value pairs to add
   * @return true if the user config was updated, false otherwise
   */
  public boolean updateUserConfig(UserConfig userConfig) {
    ClusterConfiguration clusterConfig = new ClusterConfiguration(_clusterId);
    clusterConfig.addNamespacedConfig(userConfig);
    return _accessor.updateProperty(_keyBuilder.clusterConfig(), clusterConfig);
  }
View Full Code Here

Examples of org.mule.config.ClusterConfiguration

    public void overriddenClusterConfiguration() throws Exception
    {
        final int clusterNodeId = 22;
        final String clusterId = "some-id";
        MuleContext context = new DefaultMuleContextFactory().createMuleContext();
        context.getRegistry().registerObject(MuleProperties.OBJECT_CLUSTER_CONFIGURATION, new ClusterConfiguration()
        {
            @Override
            public String getClusterId()
            {
                return clusterId;
View Full Code Here

Examples of org.mule.config.ClusterConfiguration

        return startLatch.await(timeout, TimeUnit.MILLISECONDS);
    }

    private void overrideClusterConfiguration()
    {
        ClusterConfiguration overriddenClusterConfiguration = getRegistry().get(MuleProperties.OBJECT_CLUSTER_CONFIGURATION);
        if (overriddenClusterConfiguration != null)
        {
            this.clusterConfiguration = overriddenClusterConfiguration;
        }
    }
View Full Code Here

Examples of tomekkup.helenos.ClusterConfiguration

   
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        if (isReady(event)) {
            ApplicationContext applicationContext = event.getApplicationContext();
            ClusterConfiguration configuration = clusterConfigDao.getActive();
           
            propagadeConfigChanges(applicationContext.getParent(), configuration.createCluster());
        }
    }
View Full Code Here

Examples of tomekkup.helenos.ClusterConfiguration

    public void activate(String alias) {
        if (cluster != null) {
            cluster.getConnectionManager().shutdown();
            cluster = null;
        }
        ClusterConfiguration configuration = getConnectionByAlias(alias);
        if (!configuration.isActive()) {
            configuration.setActive(true);
            store(configuration);
        }
        PostConfiguringClusterListener.propagadeConfigChanges(applicationContext, configuration.createCluster());
    }
View Full Code Here

Examples of tomekkup.helenos.ClusterConfiguration

    public long getConnectionsCount() {
        return jdbcTemplate.queryForLong(queriesProperties.getProperty("clusterconfig.count"), new HashMap<String, Object>());
    }

    private void createDefaultConfiguration() {
        jdbcTemplate.update(queriesProperties.getProperty("clusterconfig.insert"), prepareParameterSource(new ClusterConfiguration("default", defaultHost, defaultClusterName, true)));
    }
View Full Code Here

Examples of tomekkup.helenos.ClusterConfiguration

    private static final class ClusterConfigurationMapper implements RowMapper<ClusterConfiguration> {

        @Override
        public ClusterConfiguration mapRow(ResultSet rs, int rowNum) throws SQLException {
            ClusterConfiguration cc = new ClusterConfiguration();
            cc.setAlias(rs.getString("ALIAS"));
            cc.setHosts(rs.getString("HOSTS"));
            cc.setClusterName(rs.getString("CLUSTERNAME"));
            cc.setActive(rs.getBoolean("ACTIVE"));
            return cc;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.