org.scale7.cassandra.pelops.pool
Class DescribeVersionConnectionValidator
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DescribeVersionConnectionValidator
public DescribeVersionConnectionValidator()
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.