Thursday, 5 September 2013

Check Session with Cassandra Datastax Java Driver

Check Session with Cassandra Datastax Java Driver

Is there any direct way to check if a Cluster/Session is connected/valid/ok?
I mean, I have a com.datastax.driver.core.Session created into a
neverending thread and I'd like to assure the session is ok every time is
needed. I use the next cluster initialization, but I'm not sure this is
enough...
Cluster.builder().addContactPoint(url)
.withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE)
.withReconnectionPolicy(new ConstantReconnectionPolicy(1000L)).build());

No comments:

Post a Comment