Package me.prettyprint.cassandra.connection

Examples of me.prettyprint.cassandra.connection.HConnectionManager


  @Before
  public void setupCase() throws TTransportException, TException, IllegalArgumentException,
          NotFoundException, UnknownHostException, Exception {
    cassandraHostConfigurator = new CassandraHostConfigurator("localhost:9170");
    connectionManager = new HConnectionManager(cassandraHostConfigurator,null);
  }
View Full Code Here


  }


  protected void setupClient() {
    cassandraHostConfigurator = new CassandraHostConfigurator("127.0.0.1:9170");
    connectionManager = new HConnectionManager(cassandraHostConfigurator,null);
  }
View Full Code Here

  public AbstractCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator) {
    this(clusterName, cassandraHostConfigurator, EMPTY_CREDENTIALS);
  }

  public AbstractCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator, Map<String, String> credentials) {
    connectionManager = new HConnectionManager(cassandraHostConfigurator,this);
    name = clusterName;
    configurator = cassandraHostConfigurator;
    failoverPolicy = FailoverPolicy.ON_FAIL_TRY_ALL_AVAILABLE;
    cassandraClientMonitor = JmxMonitor.getInstance(connectionManager).getCassandraMonitor();
    xtrans = new ExceptionsTranslatorImpl();
View Full Code Here

        clusterConfigDao.delete(alias);
    }

    @Override
    public Map<String, Set<CassandraHost>> getConnectionStatus() {
        HConnectionManager connectionManager = cluster.getConnectionManager();

        Map<String, Set<CassandraHost>> ret = new HashMap<String, Set<CassandraHost>>(3);

        ret.put("LIVE", connectionManager.getHosts());
        ret.put("DOWN", connectionManager.getDownedHosts());
        ret.put("SUSPENDED", connectionManager.getSuspendedCassandraHosts());

        return ret;
    }
View Full Code Here

  public AbstractCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator) {
    this(clusterName, cassandraHostConfigurator, EMPTY_CREDENTIALS);
  }

  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();
View Full Code Here

TOP

Related Classes of me.prettyprint.cassandra.connection.HConnectionManager

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.