| Modifier and Type | Field and Description |
|---|---|
| private final Lock | |
| protected MultiHostConnectionProxy | thisAsProxy
thisAsProxy holds the proxy (MultiHostConnectionProxy or one of its subclasses) this connection is associated with. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | abort(Executor
The executor)Executor implementation which will
be used by abort.Implements java. Terminates an open connection. |
| public void | abortInternal()
Implements com. Clobbers the physical network connection and marks this connection as closed. |
| public void | changeUser(String
the username to authenticate with userName, String the password to authenticate with newPassword)Implements com. Changes the user on this connection by performing a re-authentication. |
| public void | |
| public void | cleanup(Throwable
exception caused the connection clean up whyCleanedUp)Implements com. Destroys this connection and any underlying resources. |
| public void | clearWarnings()
Implements java. Clears all warnings reported for this |
| public PreparedStatement | clientPrepareStatement(String
statement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency, int resultSetHoldability resultSetHoldability)Implements com. Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | clientPrepareStatement(String
statement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency)Implements com. Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | clientPrepareStatement(String
statement sql, int autoGenKeyIndex autoGenKeyIndex)Implements com. Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | clientPrepareStatement(String
statement sql, int[] autoGenKeyIndexes autoGenKeyIndexes)Implements com. Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | clientPrepareStatement(String
statement sql, String[] autoGenKeyColNames autoGenKeyColNames)Implements com. Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public PreparedStatement | clientPrepareStatement(String
statement sql)Implements com. Prepares a statement on the client, using client-side emulation (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the java.sql.Connection.prepareStatement() method with the same argument types. |
| public void | close()
Implements java. Releases this |
| public void | commit()
Implements java. Makes all changes made since the previous
commit/rollback permanent and releases any database locks
currently held by this |
| public Array | createArrayOf(String
the SQL name of the type the elements of the array map to. The typeName is a
database-specific name which may be the name of a built-in type, a user-defined type or a standard SQL type supported by this database. This
is the value returned by typeName, Object[] Array.getBaseTypeNamethe elements that populate the returned object elements)Implements java. Factory method for creating Array objects. |
| public Blob | createBlob()
Implements java. Constructs an object that implements the |
| public Clob | createClob()
Implements java. Constructs an object that implements the |
| public NClob | createNClob()
Implements java. Constructs an object that implements the |
| public void | createNewIO(boolean
is this request for a re-connect isForReconnect)Implements com. Creates an IO channel to the server. |
| public SQLXML | createSQLXML()
Implements java. Constructs an object that implements the |
| public Statement | createStatement()
Implements java. Creates a |
| public Statement | createStatement(int
one of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Creates a |
| public Statement | createStatement(int
a result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEImplements java. Creates a |
| public Struct | createStruct(String
the SQL type name of the SQL structured type that this typeName, Object[] Struct
object maps to. The typeName is the name of a user-defined type that
has been defined for this database. It is the value returned by
Struct.getSQLTypeName.the attributes that populate the returned object attributes)Implements java. Factory method for creating Struct objects. |
| public void | |
| public void | doClose(Throwable
the exception that caused this method call cause, CloseOption... options indicating how the close was initiated and/or what should be performed during the close options)Implements com. Close the connection and release resources. |
| public JdbcConnection | |
| public int | getActiveStatementCount()
Implements com. Returns the number of statements active on this connection, which haven't been .close()d. |
| public boolean | getAutoCommit()
Implements java. Retrieves the current auto-commit mode for this |
| public int | getAutoIncrementIncrement()
Implements com. Returns the session value of 'auto_increment_increment' from the server if it exists, or '1' if not. |
| public CachedResultSetMetaData | getCachedMetaData(String
the query that is the key to the cache sql)Implements com. Returns cached metadata (or null if not cached) for the given query, which must match _exactly_. |
| public String | getCatalog()
Implements java. Retrieves this |
| public String | |
| public Properties | getClientInfo()
Implements java. Returns a list containing the name and current value of each client info property supported by the driver. |
| public String | getClientInfo(String
The name of the client info property to retrieve name)Implements java. Returns the value of the client info property specified by name. |
| public ClientInfoProvider | |
| public Lock | |
| public String | getDatabase()
Implements com. Retrieves this connection object's current database name. |
| public ExceptionInterceptor | |
| public int | getHoldability()
Implements java. Retrieves the current holdability of |
| public String | |
| public String | |
| public long | |
| public long | getIdleFor()
Implements com. Reports how long this connection has been idle. |
| public Lock | |
| public DatabaseMetaData | getMetaData()
Implements java. Retrieves a |
| public Statement | |
| public JdbcConnection | |
| public JdbcConnection | |
| public int | getNetworkTimeout()
Implements java. Retrieves the number of milliseconds the driver will wait for a database request to complete. |
| public Properties | getProperties()
Implements com. Returns the parsed and passed in properties for this connection. |
| public JdbcPropertySet | |
| public List | |
| public String | getSchema()
Implements java. Retrieves this |
| public ServerSessionStateController | |
| public ServerVersion | |
| public Session | |
| public int | getSessionMaxRows()
Implements com. Returns the sql select limit max-rows for this session. |
| public String | getStatementComment()
Implements com. Returns the comment that will be prepended to all statements sent to the server. |
| public MultiHostConnectionProxy | |
| public int | getTransactionIsolation()
Implements java. Retrieves this |
| public Map | getTypeMap()
Implements java. Retrieves the |
| public String | |
| public String | |
| public SQLWarning | getWarnings()
Implements java. Retrieves the first warning reported by calls on this
|
| public boolean | hasSameProperties(JdbcConnection
connection c)Implements com. Does this connection have the same properties as another? |
| public void | initializeResultsMetadataFromCache(String
the query that the metadata pertains too. sql, CachedResultSetMetaData metadata (if it exists) to populate the cache. cachedMetaData, ResultSetInternalMethods the result set to retrieve metadata from, or apply to. resultSet)Implements com. Caches CachedResultSetMetaData that has been placed in the cache using the given SQL as a key. |
| public void | |
| public boolean | isClosed()
Implements java. Retrieves whether this |
| public boolean | isInGlobalTx()
Implements com. Is this connection currently a participant in an XA transaction? |
| public boolean | |
| public boolean | isReadOnly()
Implements java. Retrieves whether this |
| public boolean | isReadOnly(boolean
in some cases, for example when restoring connection with autoReconnect=true, we can rely only on saved readOnly state, so use
useSessionStatus=false in that case useSessionStatus)Implements com. Tests to see if the connection is in Read Only Mode. |
| public boolean | isSameResource(JdbcConnection
connection otherConnection)Implements com. Does this connection have the same resource name as the given connection (for XA)? |
| public boolean | isServerLocal()
Implements com. Is the server this connection is connected to "local" (i.e. same host) as the application? |
| public boolean | isSourceConnection()
Implements com. Is this connection connected to the first host in the list if there is a list of servers in the URL? |
| public boolean | isValid(int
The time in seconds to wait for the database operation
used to validate the connection to complete. If the
timeout period expires before the operationcompletes,
this method returns false. A value of 0 indicates a
timeout is not applied to the database operation. timeout)Implements java. Returns true if the connection has not been closed and is still valid. |
| public boolean | isWrapperFor(Class<?>
a Class defining an interface. iface)Implements java. Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. |
| public boolean | lowerCaseTableNames()
Implements com. Is the server configured to use lower-case table names only? |
| public String | nativeSQL(String
an SQL statement that may contain one or more '?'
parameter placeholders sql)Implements java. Converts the given SQL statement into the system's native SQL grammar. |
| public void | ping()
Implements com. Detect if the connection is still good by sending a ping command to the server. |
| public void | pingInternal(boolean checkForClosedConnection, int timeoutMillis)
Implements com.
|
| public CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Creates a |
| public CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEImplements java. Creates a |
| public CallableStatement | prepareCall(String
an SQL statement that may contain one or more '?'
parameter placeholders. Typically this statement is specified using JDBC
call escape syntax. sql)Implements java. Creates a |
| public PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Creates a |
| public PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEImplements java. Creates a |
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, int a flag indicating whether auto-generated keys
should be returned; one of
autoGenKeyIndex)Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSImplements java. Creates a default |
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, int[] an array of column indexes indicating the columns
that should be returned from the inserted row or rows autoGenKeyIndexes)Implements java. Creates a default |
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, String[] an array of column names indicating the columns
that should be returned from the inserted row or rows autoGenKeyColNames)Implements java. Creates a default |
| public PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql)Implements java. Creates a |
| public void | |
| public void | registerStatement(JdbcStatement
the Statement instance to remove stmt)Implements com. Register a Statement instance as open. |
| public void | releaseSavepoint(Savepoint
the arg0)Savepoint object to be removedImplements java. Removes the specified |
| public void | resetServerState()
Implements com. Resets the server-side state of this connection. |
| public void | rollback()
Implements java. Undoes all changes made in the current transaction
and releases any database locks currently held
by this |
| public void | rollback(Savepoint
the savepoint)Savepoint object to roll back toImplements java. Undoes all changes made after the given |
| public PreparedStatement | serverPrepareStatement(String
statement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency, int resultSetHoldability resultSetHoldability)Implements com. Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | serverPrepareStatement(String
statement sql, int resultSetType resultSetType, int resultSetConcurrency resultSetConcurrency)Implements com. Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | serverPrepareStatement(String
statement sql, int autoGenKeyIndex autoGenKeyIndex)Implements com. Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | serverPrepareStatement(String
statement sql, int[] autoGenKeyIndexes autoGenKeyIndexes)Implements com. Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | serverPrepareStatement(String
statement sql, String[] autoGenKeyColNames autoGenKeyColNames)Implements com. Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public PreparedStatement | serverPrepareStatement(String
statement sql)Implements com. Prepares a statement on the server (regardless of the configuration property 'useServerPrepStmts') with the same semantics as the method java.sql.Connection.prepareStatement() with the same argument types. |
| public void | setAutoCommit(boolean
true to enable auto-commit mode;
false to disable itImplements java. Sets this connection's auto-commit mode to the given state. |
| public void | setCatalog(String
the name of a catalog (subspace in this
catalog)Connection object's database) in which to workImplements java. Sets the given catalog name in order to select
a subspace of this |
| public void | setClientInfo(Properties
the list of client info properties to set properties)Implements java. Sets the value of the connection's client info properties. |
| public void | setClientInfo(String
The name of the client info property to set name, String The value to set the client info property to. If the
value is null, the current value of the specified
property is cleared. value)Implements java. Sets the value of the client info property specified by name to the value specified by value. |
| public void | setDatabase(String
the database for this connection to use dbName)Implements com. Set current database for this connection. |
| public void | setFailedOver(boolean
The failedOver flag to set. flag)Implements com.
|
| public void | setHoldability(int
a arg0)ResultSet holdability constant; one of
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITImplements java. Changes the default holdability of |
| public void | setInGlobalTx(boolean
the state flag flag)Implements com. Set the state of being in a global (XA) transaction. |
| public void | setNetworkTimeout(Executor
The executor, int Executor implementation which will
be used by setNetworkTimeout.The time in milliseconds to wait for the database
operation
to complete. If the JDBC driver does not support milliseconds, the
JDBC driver will round the value up to the nearest second. If the
timeout period expires before the operation
completes, a SQLException will be thrown.
A value of 0 indicates that there is not timeout for database operations. milliseconds)Implements java. Sets the maximum period a |
| public void | |
| public void | setReadOnly(boolean
true enables read-only mode;
false disables itImplements java. Puts this connection in read-only mode as a hint to the driver to enable database optimizations. |
| public void | setReadOnlyInternal(boolean readOnlyFlag)
Implements com.
|
| public Savepoint | setSavepoint()
Implements java. Creates an unnamed savepoint in the current transaction and
returns the new |
| public Savepoint | setSavepoint(String
a name)String containing the name of the savepointImplements java. Creates a savepoint with the given name in the current transaction
and returns the new |
| public void | setSchema(String
the name of a schema in which to work schema)Implements java. Sets the given schema name to access. |
| public void | setSessionMaxRows(int
the new max-rows value to set. max)Implements com. Sets the sql select limit max-rows for this session if different from current. |
| public void | setStatementComment(String
the comment that will be prepended to all statements sent to the server. comment)Implements com. Sets the comment that will be prepended to all statements sent to the server. |
| public void | setTransactionIsolation(int
one of the following level)Connection constants:
Connection.TRANSACTION_READ_UNCOMMITTED,
Connection.TRANSACTION_READ_COMMITTED,
Connection.TRANSACTION_REPEATABLE_READ, or
Connection.TRANSACTION_SERIALIZABLE.
(Note that Connection.TRANSACTION_NONE cannot be used
because it specifies that transactions are not supported.)Implements java. Attempts to change the transaction isolation level for this
|
| public void | setTypeMap(Map<String, Class<?>>
the map)java.util.Map object to install
as the replacement for this Connection
object's default type mapImplements java. Installs the given |
| public void | shutdownServer()
Implements com. Used by MiniAdmin to shutdown a MySQL server |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | unregisterStatement(JdbcStatement
the Statement instance to remove stmt)Implements com. Remove the given statement from the list of open statements |
| public void | |
| public <T> T | unwrap(Class<T>
A Class defining an interface that the result must implement. iface)Implements java. Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |