Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zznate/432318 to your computer and use it in GitHub Desktop.
Save zznate/432318 to your computer and use it in GitHub Desktop.
Assuming I have three hosts I want to configure Identically:
CassandraHostConfigurator cassandraHostConfigurator = new CassandraHostConfigurator("localhost:9170,localhost:9171,localhost:9172");
cassandraHostConfigurator.setMaxActive(20);
cassandraHostConfigurator.setMaxIdle(5);
cassandraHostConfigurator.setCassandraThriftSocketTimeout(3000);
cassandraHostConfigurator.setMaxWaitTimeWhenExhausted(4000);
cassandraHostConfigurator.setExhaustedPolicy(ExhaustedPolicy.WHEN_EXHAUSTED_GROW);
CassandraClientPool cassandraClientPool = CassandraClientPoolFactory.INSTANCE.createNew(cassandraHostConfigurator);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment