org.mariadb.jdbc.internal.mysql.listener

## Class AbstractMastersSlavesListener

- java.lang.Object
- - org.mariadb.jdbc.internal.mysql.listener.AbstractMastersListener
  - - org.mariadb.jdbc.internal.mysql.listener.AbstractMastersSlavesListener

All Implemented Interfaces:
  Listener

Direct Known Subclasses:
  MastersSlavesListener

    public abstract class AbstractMastersSlavesListener
    extends AbstractMastersListener

### Nested Class Summary

### Nested classes/interfaces inherited from class org.mariadb.jdbc.internal.mysql.listener.AbstractMastersListener

`AbstractMastersListener.FailLoop`

### Field Summary

Fields
`protected AtomicInteger` `queriesSinceFailover`

### Fields inherited from class org.mariadb.jdbc.internal.mysql.listener.AbstractMastersListener

`blacklist, currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, executorService, explicitClosed, isLooping, jdbcUrl, lastRetry, proxy, scheduledFailover`

### Constructor Summary

Constructors
`protected` `AbstractMastersSlavesListener(JDBCUrl jdbcUrl)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract void` `foundActiveSecondary(Protocol newSecondaryProtocol)`
`SearchFilter` `getFilterForFailedHost()`
`long` `getSecondaryHostFailTimestamp()`
`HandleErrorResult` `handleFailover(Method method, Object[] args)`
`boolean` `hasHostFail()`
`boolean` `isSecondaryHostFail()`
`protected void` `resetMasterFailoverData()`
`protected void` `resetSecondaryFailoverData()`
`abstract HandleErrorResult` `secondaryFail(Method method, Object[] args)`
`boolean` `setSecondaryHostFail()`

### Methods inherited from class org.mariadb.jdbc.internal.mysql.listener.AbstractMastersListener

`addToBlacklist, getBlacklist, getCurrentProtocol, getInitialTimeout, getJdbcUrl, getMasterHostFailTimestamp, getProxy, getRetriesAllDown, initializeConnection, invoke, isAutoReconnect, isClosed, isExplicitClosed, isMasterHostFail, isReadOnly, launchFailLoopIfNotlaunched, preClose, preExecute, primaryFail, reconnect, reconnectFailedConnection, relaunchOperation, resetOldsBlackListHosts, setExplicitClosed, setMasterHostFail, setProxy, setSessionReadOnly, shouldReconnect, stopFailover, switchReadOnlyConnection, syncConnection, throwFailoverMessage`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.mariadb.jdbc.internal.mysql.listener.Listener

`foundActiveMaster`

### Field Detail

#### queriesSinceFailover

    protected AtomicInteger queriesSinceFailover

### Constructor Detail

#### AbstractMastersSlavesListener

    protected AbstractMastersSlavesListener(JDBCUrl jdbcUrl)

### Method Detail

#### handleFailover

    public HandleErrorResult handleFailover(Method method,
                                            Object[] args)
                                     throws Throwable

Specified by:
  `handleFailover` in interface `Listener`
Overrides:
  `handleFailover` in class `AbstractMastersListener`
Throws:
  `Throwable`

#### resetMasterFailoverData

    protected void resetMasterFailoverData()

Overrides:
  `resetMasterFailoverData` in class `AbstractMastersListener`

#### resetSecondaryFailoverData

    protected void resetSecondaryFailoverData()

#### getSecondaryHostFailTimestamp

    public long getSecondaryHostFailTimestamp()

#### setSecondaryHostFail

    public boolean setSecondaryHostFail()

#### isSecondaryHostFail

    public boolean isSecondaryHostFail()

#### hasHostFail

    public boolean hasHostFail()

Overrides:
  `hasHostFail` in class `AbstractMastersListener`

#### getFilterForFailedHost

    public SearchFilter getFilterForFailedHost()

Overrides:
  `getFilterForFailedHost` in class `AbstractMastersListener`

#### secondaryFail

    public abstract HandleErrorResult secondaryFail(Method method,
                                                    Object[] args)
                                             throws Throwable

Throws:
  `Throwable`

#### foundActiveSecondary

    public abstract void foundActiveSecondary(Protocol newSecondaryProtocol)