public class MastersSlavesProtocol extends MasterProtocol
activeResult, charset, connected, currentHost, database, dataTypeMappingFlags, explicitClosed, hasWarnings, lock, moreResults, packetFetcher, prepareStatementCache, proxy, readOnly, serverStatus, serverThreadId, socket, urlParser, writer
Constructor and Description |
---|
MastersSlavesProtocol(UrlParser url,
ReentrantLock lock) |
Modifier and Type | Method and Description |
---|---|
static MastersSlavesProtocol |
getNewProtocol(FailoverProxy proxy,
UrlParser urlParser)
Get new instance of MastersSlavesProtocol.
|
static void |
loop(MastersSlavesListener listener,
List<HostAddress> addresses,
Map<HostAddress,Long> blacklist,
SearchFilter searchFilter)
loop until found the failed connection.
|
boolean |
mustBeMasterConnection() |
void |
setMustBeMasterConnection(boolean mustBeMasterConnection) |
loop
cancelCurrentQuery, closeExplicit, closeIfActiveResult, closePreparedStatement, executeBatch, executePreparedQuery, executePreparedQueryAfterFailover, executeQuery, executeQuery, executeQuery, getAutocommit, getMaxRows, getMoreResults, getResult, getTimeout, getTransactionIsolationLevel, hasMoreResults, hasUnreadData, hexdump, hexdump, inTransaction, ping, prepare, prepareStatementCache, releasePrepareStatement, rollback, setCatalog, setInternalMaxRows, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolation
checkIfMaster, close, close, connect, connectWithoutProxy, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getMajorServerVersion, getMinorServerVersion, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, hasWarnings, isClosed, isConnected, isExplicitClosed, isMasterConnection, noBackslashEscapes, readEofPacket, setHostAddress, setHostFailedWithoutProxy, setProxy, setReadonly, shouldReconnectWithoutProxy, versionGreaterOrEqual
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkIfMaster, close, connect, connectWithoutProxy, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getMajorServerVersion, getMinorServerVersion, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, hasWarnings, isClosed, isConnected, isExplicitClosed, isMasterConnection, noBackslashEscapes, setHostAddress, setHostFailedWithoutProxy, setProxy, setReadonly, shouldReconnectWithoutProxy, versionGreaterOrEqual
public MastersSlavesProtocol(UrlParser url, ReentrantLock lock)
public static void loop(MastersSlavesListener listener, List<HostAddress> addresses, Map<HostAddress,Long> blacklist, SearchFilter searchFilter) throws QueryException
listener
- current failoveraddresses
- list of HostAddress to loopblacklist
- current blacklistsearchFilter
- search parameterQueryException
- if not foundpublic static MastersSlavesProtocol getNewProtocol(FailoverProxy proxy, UrlParser urlParser)
proxy
- proxyurlParser
- connection string Object.public boolean mustBeMasterConnection()
mustBeMasterConnection
in interface Protocol
mustBeMasterConnection
in class AbstractConnectProtocol
public void setMustBeMasterConnection(boolean mustBeMasterConnection)
Copyright © 2015. All rights reserved.