public class MastersSlavesProtocol extends MasterProtocol
Modifier and Type | Field and Description |
---|---|
protected boolean |
masterConnection |
readScheduler
activeStreamingResult, autoIncrementIncrement, connected, database, eofDeprecated, explicitClosed, hasWarnings, lock, options, proxy, reader, readOnly, serverCapabilities, serverPrepareStatementCache, serverStatus, serverThreadId, socket, socketTimeout, urlParser, writer
Constructor and Description |
---|
MastersSlavesProtocol(UrlParser url,
GlobalStateInfo globalInfo,
ReentrantLock lock) |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
foundMaster(MastersSlavesListener listener,
MastersSlavesProtocol protocol,
SearchFilter searchFilter) |
protected static boolean |
foundSecondary(MastersSlavesListener listener,
MastersSlavesProtocol protocol,
SearchFilter searchFilter) |
static void |
loop(MastersSlavesListener listener,
GlobalStateInfo globalInfo,
List<HostAddress> addresses,
SearchFilter searchFilter)
loop until found the failed connection.
|
boolean |
mustBeMasterConnection() |
void |
setMustBeMasterConnection(boolean mustBeMasterConnection) |
loop
addPrepareInCache, cancelCurrentQuery, closeExplicit, executeBatchClient, executeBatchServer, executeBatchStmt, executePreparedQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, forceReleasePrepareStatement, forceReleaseWaitingPrepareStatement, getAutocommit, getAutoIncrementIncrement, getCatalog, getMaxRows, getResult, getTimeout, getTransactionIsolationLevel, handleIoException, interrupt, inTransaction, isInterrupted, isValid, ping, prepare, prolog, prologProxy, releasePrepareStatement, reset, resetDatabase, resetStateAfterFailover, rollback, setActiveFutureTask, setCatalog, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolation, stopIfInterrupted
abort, changeSocketSoTimeout, changeSocketTcpNoDelay, checkIfMaster, close, connect, connectWithoutProxy, getActiveStreamingResult, getDatabase, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerThreadId, getServerVersion, getSocket, getTimeZone, getTraces, getUrlParser, getUsername, getWriter, hasMoreResults, hasWarnings, isClosed, isConnected, isEofDeprecated, isExplicitClosed, isMasterConnection, isServerMariaDb, noBackslashEscapes, prepareStatementCache, readEofPacket, readPipelineCheckMaster, removeActiveStreamingResult, removeHasMoreResults, sessionStateAware, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setProxy, setReadonly, setServerStatus, shouldReconnectWithoutProxy, skip, skipEofPacket, versionGreaterOrEqual
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abort, changeSocketSoTimeout, changeSocketTcpNoDelay, checkIfMaster, close, connect, connectWithoutProxy, getActiveStreamingResult, getDatabase, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerThreadId, getServerVersion, getSocket, getTimeZone, getTraces, getUrlParser, getUsername, getWriter, hasMoreResults, hasWarnings, isClosed, isConnected, isEofDeprecated, isExplicitClosed, isMasterConnection, isServerMariaDb, noBackslashEscapes, prepareStatementCache, readEofPacket, removeActiveStreamingResult, removeHasMoreResults, sessionStateAware, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setProxy, setReadonly, setServerStatus, shouldReconnectWithoutProxy, skip, skipEofPacket, versionGreaterOrEqual
public MastersSlavesProtocol(UrlParser url, GlobalStateInfo globalInfo, ReentrantLock lock)
public static void loop(MastersSlavesListener listener, GlobalStateInfo globalInfo, List<HostAddress> addresses, SearchFilter searchFilter) throws SQLException
listener
- current failoverglobalInfo
- server global variables informationaddresses
- list of HostAddress to loopsearchFilter
- search parameterSQLException
- if not foundprotected static boolean foundMaster(MastersSlavesListener listener, MastersSlavesProtocol protocol, SearchFilter searchFilter)
protected static boolean foundSecondary(MastersSlavesListener listener, MastersSlavesProtocol protocol, SearchFilter searchFilter) throws SQLException
SQLException
public boolean mustBeMasterConnection()
mustBeMasterConnection
in interface Protocol
mustBeMasterConnection
in class AbstractConnectProtocol
public void setMustBeMasterConnection(boolean mustBeMasterConnection)
Copyright © 2019 mariadb.org. All rights reserved.