org.scale7.cassandra.pelops.pool
Class DescribeVersionConnectionValidator

java.lang.Object
  extended by org.scale7.cassandra.pelops.pool.DescribeVersionConnectionValidator
All Implemented Interfaces:
CommonsBackedPool.IConnectionValidator

public class DescribeVersionConnectionValidator
extends Object
implements CommonsBackedPool.IConnectionValidator

A simple impl. that issues a call to Cassandra.Client.describe_version() to validate that the connection still works.


Constructor Summary
DescribeVersionConnectionValidator()
           
 
Method Summary
 boolean validate(CommonsBackedPool.PooledConnection connection)
          Returns true if the call to Cassandra.Client.describe_version() succeeds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescribeVersionConnectionValidator

public DescribeVersionConnectionValidator()
Method Detail

validate

public boolean validate(CommonsBackedPool.PooledConnection connection)
Returns true if the call to Cassandra.Client.describe_version() succeeds.

Specified by:
validate in interface CommonsBackedPool.IConnectionValidator
Parameters:
connection - the connection
Returns:
true if the connection is valid, otherwise false


Copyright © 2011. All Rights Reserved.