Exemplo n.º 1
0
 /* (non-Javadoc)
  * @see me.prettyprint.cassandra.service.Cluster#addHost(me.prettyprint.cassandra.service.CassandraHost, boolean)
  */
 @Override
 public void addHost(CassandraHost cassandraHost, boolean skipApplyConfig) {
   if (!skipApplyConfig && configurator != null) {
     configurator.applyConfig(cassandraHost);
   }
   connectionManager.addCassandraHost(cassandraHost);
 }
Exemplo n.º 2
0
 public AbstractCluster(
     String clusterName,
     CassandraHostConfigurator cassandraHostConfigurator,
     Map<String, String> credentials) {
   connectionManager = new HConnectionManager(clusterName, cassandraHostConfigurator);
   name = clusterName;
   configurator = cassandraHostConfigurator;
   failoverPolicy = FailoverPolicy.ON_FAIL_TRY_ALL_AVAILABLE;
   cassandraClientMonitor = JmxMonitor.getInstance().getCassandraMonitor(connectionManager);
   xtrans = new ExceptionsTranslatorImpl();
   clockResolution = cassandraHostConfigurator.getClockResolution();
   this.credentials = Collections.unmodifiableMap(credentials);
 }