Top Constructors Methods
com.mysql.cj.jdbc.ha

public Class NdbLoadBalanceExceptionChecker

extends StandardLoadBalanceExceptionChecker
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private boolean
public boolean
shouldExceptionTriggerFailover(Throwable
exception
ex
)

Overrides com.mysql.cj.jdbc.ha.StandardLoadBalanceExceptionChecker.shouldExceptionTriggerFailover.

Implements com.mysql.cj.jdbc.ha.LoadBalanceExceptionChecker.shouldExceptionTriggerFailover.

Invoked to determine whether or a given SQLException should trigger a failover in a load-balanced deployment.

Inherited from com.mysql.cj.jdbc.ha.StandardLoadBalanceExceptionChecker:
destroyinit

Constructor Detail

NdbLoadBalanceExceptionCheckerback to summary
public NdbLoadBalanceExceptionChecker()

Method Detail

checkNdbExceptionback to summary
private boolean checkNdbException(Throwable ex)
shouldExceptionTriggerFailoverback to summary
public boolean shouldExceptionTriggerFailover(Throwable ex)

Overrides com.mysql.cj.jdbc.ha.StandardLoadBalanceExceptionChecker.shouldExceptionTriggerFailover.

Implements com.mysql.cj.jdbc.ha.LoadBalanceExceptionChecker.shouldExceptionTriggerFailover.

Doc from com.mysql.cj.jdbc.ha.LoadBalanceExceptionChecker.shouldExceptionTriggerFailover.

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.

Parameters
ex:Throwable

exception

Returns:boolean

true if the exception should trigger failover.

Annotations
@Override