类 NdbLoadBalanceExceptionChecker
- java.lang.Object
-
- com.mysql.cj.jdbc.ha.StandardLoadBalanceExceptionChecker
-
- com.mysql.cj.jdbc.ha.NdbLoadBalanceExceptionChecker
-
- 所有已实现的接口:
LoadBalanceExceptionChecker
public class NdbLoadBalanceExceptionChecker extends StandardLoadBalanceExceptionChecker
-
-
构造器概要
构造器 构造器 说明 NdbLoadBalanceExceptionChecker()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanshouldExceptionTriggerFailover(Throwable ex)Invoked to determine whether or a given SQLException should trigger a failover in a load-balanced deployment.-
从类继承的方法 com.mysql.cj.jdbc.ha.StandardLoadBalanceExceptionChecker
destroy, init
-
-
-
-
方法详细资料
-
shouldExceptionTriggerFailover
public boolean shouldExceptionTriggerFailover(Throwable ex)
从接口复制的说明:LoadBalanceExceptionCheckerInvoked 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.- 指定者:
shouldExceptionTriggerFailover在接口中LoadBalanceExceptionChecker- 覆盖:
shouldExceptionTriggerFailover在类中StandardLoadBalanceExceptionChecker- 参数:
ex- exception- 返回:
- true if the exception should trigger failover.
-
-