Package tomekkup.helenos

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


    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

    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

    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

Related Classes of tomekkup.helenos.ClusterConfiguration

Copyright © 2018 www.massapicom. 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.