com.mysql.jdbc
Class NdbLoadBalanceExceptionChecker

java.lang.Object
  extended by com.mysql.jdbc.StandardLoadBalanceExceptionChecker
      extended by com.mysql.jdbc.NdbLoadBalanceExceptionChecker
All Implemented Interfaces:
Extension, LoadBalanceExceptionChecker

public class NdbLoadBalanceExceptionChecker
extends StandardLoadBalanceExceptionChecker


Constructor Summary
NdbLoadBalanceExceptionChecker()
           
 
Method Summary
 boolean shouldExceptionTriggerFailover(java.sql.SQLException ex)
          Invoked to determine whether or a given SQLException should trigger a failover in a load-balanced deployment.
 
Methods inherited from class com.mysql.jdbc.StandardLoadBalanceExceptionChecker
destroy, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NdbLoadBalanceExceptionChecker

public NdbLoadBalanceExceptionChecker()
Method Detail

shouldExceptionTriggerFailover

public boolean shouldExceptionTriggerFailover(java.sql.SQLException ex)
Description copied from interface: LoadBalanceExceptionChecker
Invoked to determine whether or a given SQLException should trigger a failover in a load-balanced deployment. The driver will not pass in a Connection instance when calling init(), but it will pass in the Properties, otherwise it acts like a normal Extension. One instance of a handler *per* JDBC connection instance will be created. If you need singleton-like behavior, you're on your own to provide it.

Specified by:
shouldExceptionTriggerFailover in interface LoadBalanceExceptionChecker
Overrides:
shouldExceptionTriggerFailover in class StandardLoadBalanceExceptionChecker
Returns:
true if the exception should trigger failover.