JavaScript is disabled on your browser.
Field Summary
Fields inherited from class org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol
activeStreamingResult , autoIncrementIncrement , connected , database , eofDeprecated , explicitClosed , hasWarnings , lock , options , proxy , reader , readOnly , serverCapabilities , serverPrepareStatementCache , serverStatus , serverThreadId , socket , socketTimeout , urlParser , writer
Constructor Summary
Constructors
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
boolean
Aurora best way to check if a node is a master : is not in read-only mode.
Initialize new protocol instance.
boolean
Indicate if current protocol is a master protocol.
boolean
Check that connection is valid.
static void
loop until found the failed connection.
void
private static void
Reinitialize loopAddresses with all hosts : all servers in randomize order with cluster
address.
private static void
Connect aurora probable master.
Methods inherited from class org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol
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 , ping , prepare , prolog , prologProxy , releasePrepareStatement , reset , resetDatabase , resetStateAfterFailover , rollback , setActiveFutureTask , setCatalog , setLocalInfileInputStream , setMaxRows , setTimeout , setTransactionIsolation , stopIfInterrupted
Methods inherited from class org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol
abort , changeSocketSoTimeout , changeSocketTcpNoDelay , 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 , isServerMariaDb , noBackslashEscapes , prepareStatementCache , readEofPacket , removeActiveStreamingResult , removeHasMoreResults , sessionStateAware , setActiveStreamingResult , setHasWarnings , setHostAddress , setHostFailedWithoutProxy , setProxy , setReadonly , setServerStatus , shouldReconnectWithoutProxy , skip , skipEofPacket , versionGreaterOrEqual
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.protocol.Protocol
abort , changeSocketSoTimeout , changeSocketTcpNoDelay , 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 , isServerMariaDb , noBackslashEscapes , prepareStatementCache , readEofPacket , removeActiveStreamingResult , removeHasMoreResults , sessionStateAware , setActiveStreamingResult , setHasWarnings , setHostAddress , setHostFailedWithoutProxy , setProxy , setReadonly , setServerStatus , shouldReconnectWithoutProxy , skip , skipEofPacket , versionGreaterOrEqual
Method Details
searchProbableMaster
Connect aurora probable master. Aurora master change in time. The only way to check that a
server is a master is to asked him.
Parameters:
listener
- aurora failover to call back if master is found
globalInfo
- server global variables information
probableMaster
- probable master host
resetHostList
Reinitialize loopAddresses with all hosts : all servers in randomize order with cluster
address. If there is an active connection, connected host are remove from list.
Parameters:
listener
- current listener
loopAddresses
- the list to reinitialize
getNewProtocol
Initialize new protocol instance.
Parameters:
proxy
- proxy
globalInfo
- server global variables information
urlParser
- connection string data's
Returns:
new AuroraProtocol
isValid
Check that connection is valid. !! careful, timeout is in milliseconds,
connection.isValid(timeout) is in seconds !!
Specified by:
isValid
in interface Protocol
Overrides:
isValid
in class AbstractQueryProtocol
Parameters:
timeout
- timeout in milliseconds
Returns:
true is valid
Throws:
SQLException
- if any error occur