public class MasterProtocol extends AbstractQueryProtocol
activeResult, charset, connected, currentHost, database, dataTypeMappingFlags, explicitClosed, hasWarnings, lock, moreResultsTypeBinary, packetFetcher, prepareStatementCache, proxy, readOnly, serverStatus, serverThreadId, socket, urlParser, writer
Constructor and Description |
---|
MasterProtocol(UrlParser urlParser,
ReentrantLock lock)
Get a protocol instance.
|
Modifier and Type | Method and Description |
---|---|
static MasterProtocol |
getNewProtocol(FailoverProxy proxy,
UrlParser urlParser)
Get new instance.
|
static void |
loop(Listener listener,
List<HostAddress> addresses,
SearchFilter searchFilter)
loop until found the failed connection.
|
cancelCurrentQuery, closeExplicit, closeIfActiveResult, closePreparedStatement, executeMultiQueries, executePreparedQuery, executePreparedQueryAfterFailover, executeQueries, executeQuery, executeQuery, forceReleasePrepareStatement, getAutocommit, getMaxRows, getMoreResults, getResult, getTimeout, getTransactionIsolationLevel, hasUnreadData, hexdump, hexdump, inTransaction, ping, prepare, prepareStatementCache, releasePrepareStatement, rollback, setCatalog, setInternalMaxRows, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolation
checkIfMaster, close, close, connect, connectWithoutProxy, getActiveResult, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getPrepareStatementCache, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, hasMoreResults, hasWarnings, isClosed, isConnected, isExplicitClosed, isMasterConnection, mustBeMasterConnection, noBackslashEscapes, readEofPacket, resetMoreResults, setActiveResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setMoreResults, setProxy, setReadonly, shouldReconnectWithoutProxy, skip, versionGreaterOrEqual
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkIfMaster, close, connect, connectWithoutProxy, getActiveResult, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, hasMoreResults, hasWarnings, isClosed, isConnected, isExplicitClosed, isMasterConnection, mustBeMasterConnection, noBackslashEscapes, setActiveResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setMoreResults, setProxy, setReadonly, shouldReconnectWithoutProxy, skip, versionGreaterOrEqual
public MasterProtocol(UrlParser urlParser, ReentrantLock lock)
urlParser
- connection URL infoslock
- the lock for thread synchronisationpublic static MasterProtocol getNewProtocol(FailoverProxy proxy, UrlParser urlParser)
proxy
- proxyurlParser
- url connection objectpublic static void loop(Listener listener, List<HostAddress> addresses, SearchFilter searchFilter) throws QueryException
listener
- current failoveraddresses
- list of HostAddress to loopsearchFilter
- search parameterQueryException
- if not foundCopyright © 2016. All rights reserved.