keyspace = (String) props.get(PersistenceProperties.KUNDERA_KEYSPACE);
}
for (Host host : ((CassandraHostConfiguration) configuration).getCassandraHosts())
{
CassandraHost cassandraHost = (CassandraHost) host;
String poolName = PelopsUtils.generatePoolName(cassandraHost.getHost(), cassandraHost.getPort(), keyspace);
if (CassandraUtilities.verifyConnection(cassandraHost.getHost(), cassandraHost.getPort()))
{
Cluster cluster = new Cluster(cassandraHost.getHost(), new IConnection.Config(cassandraHost.getPort(),
true, -1, PelopsUtils.getAuthenticationRequest(cassandraHost.getUser(),
cassandraHost.getPassword())), false);
if (logger.isInfoEnabled())
{
logger.info("Initializing connection pool for keyspace {}, host {},port {}.", keyspace,
cassandraHost.getHost(), cassandraHost.getPort());
}
Policy policy = PelopsUtils.getPoolConfigPolicy(cassandraHost);
// Add pool with specified policy. null means default operand