PageRenderTime 55ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/EQEmuJSM/mysql-connector-java-5.1.13/src/com/mysql/jdbc/ReplicationConnection.java

http://cubbers-eqemu-utils.googlecode.com/
Java | 2481 lines | 1382 code | 697 blank | 402 comment | 32 complexity | 57e74a46d42675137bd817b6eba6935a MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. /*
  2. Copyright 2004-2007 MySQL AB, 2008-2010 Sun Microsystems
  3. All rights reserved. Use is subject to license terms.
  4. The MySQL Connector/J is licensed under the terms of the GPL,
  5. like most MySQL Connectors. There are special exceptions to the
  6. terms and conditions of the GPL as it is applied to this software,
  7. see the FLOSS License Exception available on mysql.com.
  8. This program is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU General Public License as
  10. published by the Free Software Foundation; version 2 of the
  11. License.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  19. 02110-1301 USA
  20. */
  21. package com.mysql.jdbc;
  22. import java.sql.CallableStatement;
  23. import java.sql.DatabaseMetaData;
  24. import java.sql.PreparedStatement;
  25. import java.sql.SQLException;
  26. import java.sql.SQLWarning;
  27. import java.sql.Savepoint;
  28. import java.sql.Statement;
  29. import java.util.Map;
  30. import java.util.Properties;
  31. import java.util.TimeZone;
  32. import com.mysql.jdbc.log.Log;
  33. /**
  34. * Connection that opens two connections, one two a replication master, and
  35. * another to one or more slaves, and decides to use master when the connection
  36. * is not read-only, and use slave(s) when the connection is read-only.
  37. *
  38. * @version $Id: ReplicationConnection.java,v 1.1.2.1 2005/05/13 18:58:38
  39. * mmatthews Exp $
  40. */
  41. public class ReplicationConnection implements Connection, PingTarget {
  42. protected Connection currentConnection;
  43. protected Connection masterConnection;
  44. protected Connection slavesConnection;
  45. protected ReplicationConnection() {}
  46. public ReplicationConnection(Properties masterProperties,
  47. Properties slaveProperties) throws SQLException {
  48. NonRegisteringDriver driver = new NonRegisteringDriver();
  49. StringBuffer masterUrl = new StringBuffer("jdbc:mysql://");
  50. StringBuffer slaveUrl = new StringBuffer("jdbc:mysql:loadbalance://");
  51. String masterHost = masterProperties
  52. .getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY);
  53. if (masterHost != null) {
  54. masterUrl.append(masterHost);
  55. }
  56. int numHosts = Integer.parseInt(slaveProperties.getProperty(
  57. NonRegisteringDriver.NUM_HOSTS_PROPERTY_KEY));
  58. for(int i = 1; i <= numHosts; i++){
  59. String slaveHost = slaveProperties
  60. .getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY + "." + i);
  61. if (slaveHost != null) {
  62. if(i > 1){
  63. slaveUrl.append(',');
  64. }
  65. slaveUrl.append(slaveHost);
  66. }
  67. }
  68. String masterDb = masterProperties
  69. .getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
  70. masterUrl.append("/");
  71. if (masterDb != null) {
  72. masterUrl.append(masterDb);
  73. }
  74. String slaveDb = slaveProperties
  75. .getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
  76. slaveUrl.append("/");
  77. if (slaveDb != null) {
  78. slaveUrl.append(slaveDb);
  79. }
  80. slaveProperties.setProperty("roundRobinLoadBalance", "true");
  81. this.masterConnection = (com.mysql.jdbc.Connection) driver.connect(
  82. masterUrl.toString(), masterProperties);
  83. this.slavesConnection = (com.mysql.jdbc.Connection) driver.connect(
  84. slaveUrl.toString(), slaveProperties);
  85. this.slavesConnection.setReadOnly(true);
  86. this.currentConnection = this.masterConnection;
  87. }
  88. /*
  89. * (non-Javadoc)
  90. *
  91. * @see java.sql.Connection#clearWarnings()
  92. */
  93. public synchronized void clearWarnings() throws SQLException {
  94. this.currentConnection.clearWarnings();
  95. }
  96. /*
  97. * (non-Javadoc)
  98. *
  99. * @see java.sql.Connection#close()
  100. */
  101. public synchronized void close() throws SQLException {
  102. this.masterConnection.close();
  103. this.slavesConnection.close();
  104. }
  105. /*
  106. * (non-Javadoc)
  107. *
  108. * @see java.sql.Connection#commit()
  109. */
  110. public synchronized void commit() throws SQLException {
  111. this.currentConnection.commit();
  112. }
  113. /*
  114. * (non-Javadoc)
  115. *
  116. * @see java.sql.Connection#createStatement()
  117. */
  118. public Statement createStatement() throws SQLException {
  119. Statement stmt = this.currentConnection.createStatement();
  120. ((com.mysql.jdbc.Statement) stmt).setPingTarget(this);
  121. return stmt;
  122. }
  123. /*
  124. * (non-Javadoc)
  125. *
  126. * @see java.sql.Connection#createStatement(int, int)
  127. */
  128. public synchronized Statement createStatement(int resultSetType,
  129. int resultSetConcurrency) throws SQLException {
  130. Statement stmt = this.currentConnection.createStatement(resultSetType,
  131. resultSetConcurrency);
  132. ((com.mysql.jdbc.Statement) stmt).setPingTarget(this);
  133. return stmt;
  134. }
  135. /*
  136. * (non-Javadoc)
  137. *
  138. * @see java.sql.Connection#createStatement(int, int, int)
  139. */
  140. public synchronized Statement createStatement(int resultSetType,
  141. int resultSetConcurrency, int resultSetHoldability)
  142. throws SQLException {
  143. Statement stmt = this.currentConnection.createStatement(resultSetType,
  144. resultSetConcurrency, resultSetHoldability);
  145. ((com.mysql.jdbc.Statement) stmt).setPingTarget(this);
  146. return stmt;
  147. }
  148. /*
  149. * (non-Javadoc)
  150. *
  151. * @see java.sql.Connection#getAutoCommit()
  152. */
  153. public synchronized boolean getAutoCommit() throws SQLException {
  154. return this.currentConnection.getAutoCommit();
  155. }
  156. /*
  157. * (non-Javadoc)
  158. *
  159. * @see java.sql.Connection#getCatalog()
  160. */
  161. public synchronized String getCatalog() throws SQLException {
  162. return this.currentConnection.getCatalog();
  163. }
  164. public synchronized Connection getCurrentConnection() {
  165. return this.currentConnection;
  166. }
  167. /*
  168. * (non-Javadoc)
  169. *
  170. * @see java.sql.Connection#getHoldability()
  171. */
  172. public synchronized int getHoldability() throws SQLException {
  173. return this.currentConnection.getHoldability();
  174. }
  175. public synchronized Connection getMasterConnection() {
  176. return this.masterConnection;
  177. }
  178. /*
  179. * (non-Javadoc)
  180. *
  181. * @see java.sql.Connection#getMetaData()
  182. */
  183. public synchronized DatabaseMetaData getMetaData() throws SQLException {
  184. return this.currentConnection.getMetaData();
  185. }
  186. public synchronized Connection getSlavesConnection() {
  187. return this.slavesConnection;
  188. }
  189. /*
  190. * (non-Javadoc)
  191. *
  192. * @see java.sql.Connection#getTransactionIsolation()
  193. */
  194. public synchronized int getTransactionIsolation() throws SQLException {
  195. return this.currentConnection.getTransactionIsolation();
  196. }
  197. /*
  198. * (non-Javadoc)
  199. *
  200. * @see java.sql.Connection#getTypeMap()
  201. */
  202. public synchronized Map getTypeMap() throws SQLException {
  203. return this.currentConnection.getTypeMap();
  204. }
  205. /*
  206. * (non-Javadoc)
  207. *
  208. * @see java.sql.Connection#getWarnings()
  209. */
  210. public synchronized SQLWarning getWarnings() throws SQLException {
  211. return this.currentConnection.getWarnings();
  212. }
  213. /*
  214. * (non-Javadoc)
  215. *
  216. * @see java.sql.Connection#isClosed()
  217. */
  218. public synchronized boolean isClosed() throws SQLException {
  219. return this.currentConnection.isClosed();
  220. }
  221. /*
  222. * (non-Javadoc)
  223. *
  224. * @see java.sql.Connection#isReadOnly()
  225. */
  226. public synchronized boolean isReadOnly() throws SQLException {
  227. return this.currentConnection == this.slavesConnection;
  228. }
  229. /*
  230. * (non-Javadoc)
  231. *
  232. * @see java.sql.Connection#nativeSQL(java.lang.String)
  233. */
  234. public synchronized String nativeSQL(String sql) throws SQLException {
  235. return this.currentConnection.nativeSQL(sql);
  236. }
  237. /*
  238. * (non-Javadoc)
  239. *
  240. * @see java.sql.Connection#prepareCall(java.lang.String)
  241. */
  242. public CallableStatement prepareCall(String sql) throws SQLException {
  243. return this.currentConnection.prepareCall(sql);
  244. }
  245. /*
  246. * (non-Javadoc)
  247. *
  248. * @see java.sql.Connection#prepareCall(java.lang.String, int, int)
  249. */
  250. public synchronized CallableStatement prepareCall(String sql,
  251. int resultSetType, int resultSetConcurrency) throws SQLException {
  252. return this.currentConnection.prepareCall(sql, resultSetType,
  253. resultSetConcurrency);
  254. }
  255. /*
  256. * (non-Javadoc)
  257. *
  258. * @see java.sql.Connection#prepareCall(java.lang.String, int, int, int)
  259. */
  260. public synchronized CallableStatement prepareCall(String sql,
  261. int resultSetType, int resultSetConcurrency,
  262. int resultSetHoldability) throws SQLException {
  263. return this.currentConnection.prepareCall(sql, resultSetType,
  264. resultSetConcurrency, resultSetHoldability);
  265. }
  266. /*
  267. * (non-Javadoc)
  268. *
  269. * @see java.sql.Connection#prepareStatement(java.lang.String)
  270. */
  271. public PreparedStatement prepareStatement(String sql) throws SQLException {
  272. PreparedStatement pstmt = this.currentConnection.prepareStatement(sql);
  273. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  274. return pstmt;
  275. }
  276. /*
  277. * (non-Javadoc)
  278. *
  279. * @see java.sql.Connection#prepareStatement(java.lang.String, int)
  280. */
  281. public synchronized PreparedStatement prepareStatement(String sql,
  282. int autoGeneratedKeys) throws SQLException {
  283. PreparedStatement pstmt = this.currentConnection.prepareStatement(sql, autoGeneratedKeys);
  284. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  285. return pstmt;
  286. }
  287. /*
  288. * (non-Javadoc)
  289. *
  290. * @see java.sql.Connection#prepareStatement(java.lang.String, int, int)
  291. */
  292. public synchronized PreparedStatement prepareStatement(String sql,
  293. int resultSetType, int resultSetConcurrency) throws SQLException {
  294. PreparedStatement pstmt = this.currentConnection.prepareStatement(sql, resultSetType,
  295. resultSetConcurrency);
  296. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  297. return pstmt;
  298. }
  299. /*
  300. * (non-Javadoc)
  301. *
  302. * @see java.sql.Connection#prepareStatement(java.lang.String, int, int,
  303. * int)
  304. */
  305. public synchronized PreparedStatement prepareStatement(String sql,
  306. int resultSetType, int resultSetConcurrency,
  307. int resultSetHoldability) throws SQLException {
  308. PreparedStatement pstmt = this.currentConnection.prepareStatement(sql, resultSetType,
  309. resultSetConcurrency, resultSetHoldability);
  310. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  311. return pstmt;
  312. }
  313. /*
  314. * (non-Javadoc)
  315. *
  316. * @see java.sql.Connection#prepareStatement(java.lang.String, int[])
  317. */
  318. public synchronized PreparedStatement prepareStatement(String sql,
  319. int[] columnIndexes) throws SQLException {
  320. PreparedStatement pstmt = this.currentConnection.prepareStatement(sql, columnIndexes);
  321. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  322. return pstmt;
  323. }
  324. /*
  325. * (non-Javadoc)
  326. *
  327. * @see java.sql.Connection#prepareStatement(java.lang.String,
  328. * java.lang.String[])
  329. */
  330. public synchronized PreparedStatement prepareStatement(String sql,
  331. String[] columnNames) throws SQLException {
  332. PreparedStatement pstmt = this.currentConnection.prepareStatement(sql, columnNames);
  333. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  334. return pstmt;
  335. }
  336. /*
  337. * (non-Javadoc)
  338. *
  339. * @see java.sql.Connection#releaseSavepoint(java.sql.Savepoint)
  340. */
  341. public synchronized void releaseSavepoint(Savepoint savepoint)
  342. throws SQLException {
  343. this.currentConnection.releaseSavepoint(savepoint);
  344. }
  345. /*
  346. * (non-Javadoc)
  347. *
  348. * @see java.sql.Connection#rollback()
  349. */
  350. public synchronized void rollback() throws SQLException {
  351. this.currentConnection.rollback();
  352. }
  353. /*
  354. * (non-Javadoc)
  355. *
  356. * @see java.sql.Connection#rollback(java.sql.Savepoint)
  357. */
  358. public synchronized void rollback(Savepoint savepoint) throws SQLException {
  359. this.currentConnection.rollback(savepoint);
  360. }
  361. /*
  362. * (non-Javadoc)
  363. *
  364. * @see java.sql.Connection#setAutoCommit(boolean)
  365. */
  366. public synchronized void setAutoCommit(boolean autoCommit)
  367. throws SQLException {
  368. this.currentConnection.setAutoCommit(autoCommit);
  369. }
  370. /*
  371. * (non-Javadoc)
  372. *
  373. * @see java.sql.Connection#setCatalog(java.lang.String)
  374. */
  375. public synchronized void setCatalog(String catalog) throws SQLException {
  376. this.currentConnection.setCatalog(catalog);
  377. }
  378. /*
  379. * (non-Javadoc)
  380. *
  381. * @see java.sql.Connection#setHoldability(int)
  382. */
  383. public synchronized void setHoldability(int holdability)
  384. throws SQLException {
  385. this.currentConnection.setHoldability(holdability);
  386. }
  387. /*
  388. * (non-Javadoc)
  389. *
  390. * @see java.sql.Connection#setReadOnly(boolean)
  391. */
  392. public synchronized void setReadOnly(boolean readOnly) throws SQLException {
  393. if (readOnly) {
  394. if (currentConnection != slavesConnection) {
  395. switchToSlavesConnection();
  396. }
  397. } else {
  398. if (currentConnection != masterConnection) {
  399. switchToMasterConnection();
  400. }
  401. }
  402. }
  403. /*
  404. * (non-Javadoc)
  405. *
  406. * @see java.sql.Connection#setSavepoint()
  407. */
  408. public synchronized Savepoint setSavepoint() throws SQLException {
  409. return this.currentConnection.setSavepoint();
  410. }
  411. /*
  412. * (non-Javadoc)
  413. *
  414. * @see java.sql.Connection#setSavepoint(java.lang.String)
  415. */
  416. public synchronized Savepoint setSavepoint(String name) throws SQLException {
  417. return this.currentConnection.setSavepoint(name);
  418. }
  419. /*
  420. * (non-Javadoc)
  421. *
  422. * @see java.sql.Connection#setTransactionIsolation(int)
  423. */
  424. public synchronized void setTransactionIsolation(int level)
  425. throws SQLException {
  426. this.currentConnection.setTransactionIsolation(level);
  427. }
  428. // For testing
  429. /*
  430. * (non-Javadoc)
  431. *
  432. * @see java.sql.Connection#setTypeMap(java.util.Map)
  433. */
  434. public synchronized void setTypeMap(Map arg0) throws SQLException {
  435. this.currentConnection.setTypeMap(arg0);
  436. }
  437. private synchronized void switchToMasterConnection() throws SQLException {
  438. swapConnections(this.masterConnection, this.slavesConnection);
  439. }
  440. private synchronized void switchToSlavesConnection() throws SQLException {
  441. swapConnections(this.slavesConnection, this.masterConnection);
  442. }
  443. /**
  444. * Swaps current context (catalog, autocommit and txn_isolation) from
  445. * sourceConnection to targetConnection, and makes targetConnection
  446. * the "current" connection that will be used for queries.
  447. *
  448. * @param switchToConnection the connection to swap from
  449. * @param switchFromConnection the connection to swap to
  450. *
  451. * @throws SQLException if an error occurs
  452. */
  453. private synchronized void swapConnections(Connection switchToConnection,
  454. Connection switchFromConnection) throws SQLException {
  455. String switchFromCatalog = switchFromConnection.getCatalog();
  456. String switchToCatalog = switchToConnection.getCatalog();
  457. if (switchToCatalog != null && !switchToCatalog.equals(switchFromCatalog)) {
  458. switchToConnection.setCatalog(switchFromCatalog);
  459. } else if (switchFromCatalog != null) {
  460. switchToConnection.setCatalog(switchFromCatalog);
  461. }
  462. boolean switchToAutoCommit = switchToConnection.getAutoCommit();
  463. boolean switchFromConnectionAutoCommit = switchFromConnection.getAutoCommit();
  464. if (switchFromConnectionAutoCommit != switchToAutoCommit) {
  465. switchToConnection.setAutoCommit(switchFromConnectionAutoCommit);
  466. }
  467. int switchToIsolation = switchToConnection
  468. .getTransactionIsolation();
  469. int switchFromIsolation = switchFromConnection.getTransactionIsolation();
  470. if (switchFromIsolation != switchToIsolation) {
  471. switchToConnection
  472. .setTransactionIsolation(switchFromIsolation);
  473. }
  474. this.currentConnection = switchToConnection;
  475. }
  476. public synchronized void doPing() throws SQLException {
  477. if (this.masterConnection != null) {
  478. this.masterConnection.ping();
  479. }
  480. if (this.slavesConnection != null) {
  481. this.slavesConnection.ping();
  482. }
  483. }
  484. public synchronized void changeUser(String userName, String newPassword)
  485. throws SQLException {
  486. this.masterConnection.changeUser(userName, newPassword);
  487. this.slavesConnection.changeUser(userName, newPassword);
  488. }
  489. public synchronized void clearHasTriedMaster() {
  490. this.masterConnection.clearHasTriedMaster();
  491. this.slavesConnection.clearHasTriedMaster();
  492. }
  493. public synchronized PreparedStatement clientPrepareStatement(String sql)
  494. throws SQLException {
  495. PreparedStatement pstmt = this.currentConnection.clientPrepareStatement(sql);
  496. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  497. return pstmt;
  498. }
  499. public synchronized PreparedStatement clientPrepareStatement(String sql,
  500. int autoGenKeyIndex) throws SQLException {
  501. PreparedStatement pstmt = this.currentConnection.clientPrepareStatement(sql, autoGenKeyIndex);
  502. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  503. return pstmt;
  504. }
  505. public synchronized PreparedStatement clientPrepareStatement(String sql,
  506. int resultSetType, int resultSetConcurrency) throws SQLException {
  507. PreparedStatement pstmt = this.currentConnection.clientPrepareStatement(sql, resultSetType, resultSetConcurrency);
  508. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  509. return pstmt;
  510. }
  511. public synchronized PreparedStatement clientPrepareStatement(String sql,
  512. int[] autoGenKeyIndexes) throws SQLException {
  513. PreparedStatement pstmt = this.currentConnection.clientPrepareStatement(sql, autoGenKeyIndexes);
  514. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  515. return pstmt;
  516. }
  517. public synchronized PreparedStatement clientPrepareStatement(String sql,
  518. int resultSetType, int resultSetConcurrency,
  519. int resultSetHoldability) throws SQLException {
  520. PreparedStatement pstmt = this.currentConnection.clientPrepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
  521. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  522. return pstmt;
  523. }
  524. public synchronized PreparedStatement clientPrepareStatement(String sql,
  525. String[] autoGenKeyColNames) throws SQLException {
  526. PreparedStatement pstmt = this.currentConnection.clientPrepareStatement(sql, autoGenKeyColNames);
  527. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  528. return pstmt;
  529. }
  530. public synchronized int getActiveStatementCount() {
  531. return this.currentConnection.getActiveStatementCount();
  532. }
  533. public synchronized long getIdleFor() {
  534. return this.currentConnection.getIdleFor();
  535. }
  536. public synchronized Log getLog() throws SQLException {
  537. return this.currentConnection.getLog();
  538. }
  539. public synchronized String getServerCharacterEncoding() {
  540. return this.currentConnection.getServerCharacterEncoding();
  541. }
  542. public synchronized TimeZone getServerTimezoneTZ() {
  543. return this.currentConnection.getServerTimezoneTZ();
  544. }
  545. public synchronized String getStatementComment() {
  546. return this.currentConnection.getStatementComment();
  547. }
  548. public synchronized boolean hasTriedMaster() {
  549. return this.currentConnection.hasTriedMaster();
  550. }
  551. public synchronized void initializeExtension(Extension ex) throws SQLException {
  552. this.currentConnection.initializeExtension(ex);
  553. }
  554. public synchronized boolean isAbonormallyLongQuery(long millisOrNanos) {
  555. return this.currentConnection.isAbonormallyLongQuery(millisOrNanos);
  556. }
  557. public synchronized boolean isInGlobalTx() {
  558. return this.currentConnection.isInGlobalTx();
  559. }
  560. public synchronized boolean isMasterConnection() {
  561. return this.currentConnection.isMasterConnection();
  562. }
  563. public synchronized boolean isNoBackslashEscapesSet() {
  564. return this.currentConnection.isNoBackslashEscapesSet();
  565. }
  566. public synchronized boolean lowerCaseTableNames() {
  567. return this.currentConnection.lowerCaseTableNames();
  568. }
  569. public synchronized boolean parserKnowsUnicode() {
  570. return this.currentConnection.parserKnowsUnicode();
  571. }
  572. public synchronized void ping() throws SQLException {
  573. this.masterConnection.ping();
  574. this.slavesConnection.ping();
  575. }
  576. public synchronized void reportQueryTime(long millisOrNanos) {
  577. this.currentConnection.reportQueryTime(millisOrNanos);
  578. }
  579. public synchronized void resetServerState() throws SQLException {
  580. this.currentConnection.resetServerState();
  581. }
  582. public synchronized PreparedStatement serverPrepareStatement(String sql)
  583. throws SQLException {
  584. PreparedStatement pstmt = this.currentConnection.serverPrepareStatement(sql);
  585. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  586. return pstmt;
  587. }
  588. public synchronized PreparedStatement serverPrepareStatement(String sql,
  589. int autoGenKeyIndex) throws SQLException {
  590. PreparedStatement pstmt = this.currentConnection.serverPrepareStatement(sql, autoGenKeyIndex);
  591. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  592. return pstmt;
  593. }
  594. public synchronized PreparedStatement serverPrepareStatement(String sql,
  595. int resultSetType, int resultSetConcurrency) throws SQLException {
  596. PreparedStatement pstmt = this.currentConnection.serverPrepareStatement(sql, resultSetType, resultSetConcurrency);
  597. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  598. return pstmt;
  599. }
  600. public synchronized PreparedStatement serverPrepareStatement(String sql,
  601. int resultSetType, int resultSetConcurrency,
  602. int resultSetHoldability) throws SQLException {
  603. PreparedStatement pstmt = this.currentConnection.serverPrepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
  604. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  605. return pstmt;
  606. }
  607. public synchronized PreparedStatement serverPrepareStatement(String sql,
  608. int[] autoGenKeyIndexes) throws SQLException {
  609. PreparedStatement pstmt = this.currentConnection.serverPrepareStatement(sql, autoGenKeyIndexes);
  610. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  611. return pstmt;
  612. }
  613. public synchronized PreparedStatement serverPrepareStatement(String sql,
  614. String[] autoGenKeyColNames) throws SQLException {
  615. PreparedStatement pstmt = this.currentConnection.serverPrepareStatement(sql, autoGenKeyColNames);
  616. ((com.mysql.jdbc.Statement) pstmt).setPingTarget(this);
  617. return pstmt;
  618. }
  619. public synchronized void setFailedOver(boolean flag) {
  620. this.currentConnection.setFailedOver(flag);
  621. }
  622. public synchronized void setPreferSlaveDuringFailover(boolean flag) {
  623. this.currentConnection.setPreferSlaveDuringFailover(flag);
  624. }
  625. public synchronized void setStatementComment(String comment) {
  626. this.masterConnection.setStatementComment(comment);
  627. this.slavesConnection.setStatementComment(comment);
  628. }
  629. public synchronized void shutdownServer() throws SQLException {
  630. this.currentConnection.shutdownServer();
  631. }
  632. public synchronized boolean supportsIsolationLevel() {
  633. return this.currentConnection.supportsIsolationLevel();
  634. }
  635. public synchronized boolean supportsQuotedIdentifiers() {
  636. return this.currentConnection.supportsQuotedIdentifiers();
  637. }
  638. public synchronized boolean supportsTransactions() {
  639. return this.currentConnection.supportsTransactions();
  640. }
  641. public synchronized boolean versionMeetsMinimum(int major, int minor, int subminor)
  642. throws SQLException {
  643. return this.currentConnection.versionMeetsMinimum(major, minor, subminor);
  644. }
  645. public synchronized String exposeAsXml() throws SQLException {
  646. return this.currentConnection.exposeAsXml();
  647. }
  648. public synchronized boolean getAllowLoadLocalInfile() {
  649. return this.currentConnection.getAllowLoadLocalInfile();
  650. }
  651. public synchronized boolean getAllowMultiQueries() {
  652. return this.currentConnection.getAllowMultiQueries();
  653. }
  654. public synchronized boolean getAllowNanAndInf() {
  655. return this.currentConnection.getAllowNanAndInf();
  656. }
  657. public synchronized boolean getAllowUrlInLocalInfile() {
  658. return this.currentConnection.getAllowUrlInLocalInfile();
  659. }
  660. public synchronized boolean getAlwaysSendSetIsolation() {
  661. return this.currentConnection.getAlwaysSendSetIsolation();
  662. }
  663. public synchronized boolean getAutoClosePStmtStreams() {
  664. return this.currentConnection.getAutoClosePStmtStreams();
  665. }
  666. public synchronized boolean getAutoDeserialize() {
  667. return this.currentConnection.getAutoDeserialize();
  668. }
  669. public synchronized boolean getAutoGenerateTestcaseScript() {
  670. return this.currentConnection.getAutoGenerateTestcaseScript();
  671. }
  672. public synchronized boolean getAutoReconnectForPools() {
  673. return this.currentConnection.getAutoReconnectForPools();
  674. }
  675. public synchronized boolean getAutoSlowLog() {
  676. return this.currentConnection.getAutoSlowLog();
  677. }
  678. public synchronized int getBlobSendChunkSize() {
  679. return this.currentConnection.getBlobSendChunkSize();
  680. }
  681. public synchronized boolean getBlobsAreStrings() {
  682. return this.currentConnection.getBlobsAreStrings();
  683. }
  684. public synchronized boolean getCacheCallableStatements() {
  685. return this.currentConnection.getCacheCallableStatements();
  686. }
  687. public synchronized boolean getCacheCallableStmts() {
  688. return this.currentConnection.getCacheCallableStmts();
  689. }
  690. public synchronized boolean getCachePrepStmts() {
  691. return this.currentConnection.getCachePrepStmts();
  692. }
  693. public synchronized boolean getCachePreparedStatements() {
  694. return this.currentConnection.getCachePreparedStatements();
  695. }
  696. public synchronized boolean getCacheResultSetMetadata() {
  697. return this.currentConnection.getCacheResultSetMetadata();
  698. }
  699. public synchronized boolean getCacheServerConfiguration() {
  700. return this.currentConnection.getCacheServerConfiguration();
  701. }
  702. public synchronized int getCallableStatementCacheSize() {
  703. return this.currentConnection.getCallableStatementCacheSize();
  704. }
  705. public synchronized int getCallableStmtCacheSize() {
  706. return this.currentConnection.getCallableStmtCacheSize();
  707. }
  708. public synchronized boolean getCapitalizeTypeNames() {
  709. return this.currentConnection.getCapitalizeTypeNames();
  710. }
  711. public synchronized String getCharacterSetResults() {
  712. return this.currentConnection.getCharacterSetResults();
  713. }
  714. public synchronized String getClientCertificateKeyStorePassword() {
  715. return this.currentConnection.getClientCertificateKeyStorePassword();
  716. }
  717. public synchronized String getClientCertificateKeyStoreType() {
  718. return this.currentConnection.getClientCertificateKeyStoreType();
  719. }
  720. public synchronized String getClientCertificateKeyStoreUrl() {
  721. return this.currentConnection.getClientCertificateKeyStoreUrl();
  722. }
  723. public synchronized String getClientInfoProvider() {
  724. return this.currentConnection.getClientInfoProvider();
  725. }
  726. public synchronized String getClobCharacterEncoding() {
  727. return this.currentConnection.getClobCharacterEncoding();
  728. }
  729. public synchronized boolean getClobberStreamingResults() {
  730. return this.currentConnection.getClobberStreamingResults();
  731. }
  732. public synchronized int getConnectTimeout() {
  733. return this.currentConnection.getConnectTimeout();
  734. }
  735. public synchronized String getConnectionCollation() {
  736. return this.currentConnection.getConnectionCollation();
  737. }
  738. public synchronized String getConnectionLifecycleInterceptors() {
  739. return this.currentConnection.getConnectionLifecycleInterceptors();
  740. }
  741. public synchronized boolean getContinueBatchOnError() {
  742. return this.currentConnection.getContinueBatchOnError();
  743. }
  744. public synchronized boolean getCreateDatabaseIfNotExist() {
  745. return this.currentConnection.getCreateDatabaseIfNotExist();
  746. }
  747. public synchronized int getDefaultFetchSize() {
  748. return this.currentConnection.getDefaultFetchSize();
  749. }
  750. public synchronized boolean getDontTrackOpenResources() {
  751. return this.currentConnection.getDontTrackOpenResources();
  752. }
  753. public synchronized boolean getDumpMetadataOnColumnNotFound() {
  754. return this.currentConnection.getDumpMetadataOnColumnNotFound();
  755. }
  756. public synchronized boolean getDumpQueriesOnException() {
  757. return this.currentConnection.getDumpQueriesOnException();
  758. }
  759. public synchronized boolean getDynamicCalendars() {
  760. return this.currentConnection.getDynamicCalendars();
  761. }
  762. public synchronized boolean getElideSetAutoCommits() {
  763. return this.currentConnection.getElideSetAutoCommits();
  764. }
  765. public synchronized boolean getEmptyStringsConvertToZero() {
  766. return this.currentConnection.getEmptyStringsConvertToZero();
  767. }
  768. public synchronized boolean getEmulateLocators() {
  769. return this.currentConnection.getEmulateLocators();
  770. }
  771. public synchronized boolean getEmulateUnsupportedPstmts() {
  772. return this.currentConnection.getEmulateUnsupportedPstmts();
  773. }
  774. public synchronized boolean getEnablePacketDebug() {
  775. return this.currentConnection.getEnablePacketDebug();
  776. }
  777. public synchronized boolean getEnableQueryTimeouts() {
  778. return this.currentConnection.getEnableQueryTimeouts();
  779. }
  780. public synchronized String getEncoding() {
  781. return this.currentConnection.getEncoding();
  782. }
  783. public synchronized boolean getExplainSlowQueries() {
  784. return this.currentConnection.getExplainSlowQueries();
  785. }
  786. public synchronized boolean getFailOverReadOnly() {
  787. return this.currentConnection.getFailOverReadOnly();
  788. }
  789. public synchronized boolean getFunctionsNeverReturnBlobs() {
  790. return this.currentConnection.getFunctionsNeverReturnBlobs();
  791. }
  792. public synchronized boolean getGatherPerfMetrics() {
  793. return this.currentConnection.getGatherPerfMetrics();
  794. }
  795. public synchronized boolean getGatherPerformanceMetrics() {
  796. return this.currentConnection.getGatherPerformanceMetrics();
  797. }
  798. public synchronized boolean getGenerateSimpleParameterMetadata() {
  799. return this.currentConnection.getGenerateSimpleParameterMetadata();
  800. }
  801. public synchronized boolean getHoldResultsOpenOverStatementClose() {
  802. return this.currentConnection.getHoldResultsOpenOverStatementClose();
  803. }
  804. public synchronized boolean getIgnoreNonTxTables() {
  805. return this.currentConnection.getIgnoreNonTxTables();
  806. }
  807. public synchronized boolean getIncludeInnodbStatusInDeadlockExceptions() {
  808. return this.currentConnection.getIncludeInnodbStatusInDeadlockExceptions();
  809. }
  810. public synchronized int getInitialTimeout() {
  811. return this.currentConnection.getInitialTimeout();
  812. }
  813. public synchronized boolean getInteractiveClient() {
  814. return this.currentConnection.getInteractiveClient();
  815. }
  816. public synchronized boolean getIsInteractiveClient() {
  817. return this.currentConnection.getIsInteractiveClient();
  818. }
  819. public synchronized boolean getJdbcCompliantTruncation() {
  820. return this.currentConnection.getJdbcCompliantTruncation();
  821. }
  822. public synchronized boolean getJdbcCompliantTruncationForReads() {
  823. return this.currentConnection.getJdbcCompliantTruncationForReads();
  824. }
  825. public synchronized String getLargeRowSizeThreshold() {
  826. return this.currentConnection.getLargeRowSizeThreshold();
  827. }
  828. public synchronized String getLoadBalanceStrategy() {
  829. return this.currentConnection.getLoadBalanceStrategy();
  830. }
  831. public synchronized String getLocalSocketAddress() {
  832. return this.currentConnection.getLocalSocketAddress();
  833. }
  834. public synchronized int getLocatorFetchBufferSize() {
  835. return this.currentConnection.getLocatorFetchBufferSize();
  836. }
  837. public synchronized boolean getLogSlowQueries() {
  838. return this.currentConnection.getLogSlowQueries();
  839. }
  840. public synchronized boolean getLogXaCommands() {
  841. return this.currentConnection.getLogXaCommands();
  842. }
  843. public synchronized String getLogger() {
  844. return this.currentConnection.getLogger();
  845. }
  846. public synchronized String getLoggerClassName() {
  847. return this.currentConnection.getLoggerClassName();
  848. }
  849. public synchronized boolean getMaintainTimeStats() {
  850. return this.currentConnection.getMaintainTimeStats();
  851. }
  852. public synchronized int getMaxQuerySizeToLog() {
  853. return this.currentConnection.getMaxQuerySizeToLog();
  854. }
  855. public synchronized int getMaxReconnects() {
  856. return this.currentConnection.getMaxReconnects();
  857. }
  858. public synchronized int getMaxRows() {
  859. return this.currentConnection.getMaxRows();
  860. }
  861. public synchronized int getMetadataCacheSize() {
  862. return this.currentConnection.getMetadataCacheSize();
  863. }
  864. public synchronized int getNetTimeoutForStreamingResults() {
  865. return this.currentConnection.getNetTimeoutForStreamingResults();
  866. }
  867. public synchronized boolean getNoAccessToProcedureBodies() {
  868. return this.currentConnection.getNoAccessToProcedureBodies();
  869. }
  870. public synchronized boolean getNoDatetimeStringSync() {
  871. return this.currentConnection.getNoDatetimeStringSync();
  872. }
  873. public synchronized boolean getNoTimezoneConversionForTimeType() {
  874. return this.currentConnection.getNoTimezoneConversionForTimeType();
  875. }
  876. public synchronized boolean getNullCatalogMeansCurrent() {
  877. return this.currentConnection.getNullCatalogMeansCurrent();
  878. }
  879. public synchronized boolean getNullNamePatternMatchesAll() {
  880. return this.currentConnection.getNullNamePatternMatchesAll();
  881. }
  882. public synchronized boolean getOverrideSupportsIntegrityEnhancementFacility() {
  883. return this.currentConnection.getOverrideSupportsIntegrityEnhancementFacility();
  884. }
  885. public synchronized int getPacketDebugBufferSize() {
  886. return this.currentConnection.getPacketDebugBufferSize();
  887. }
  888. public synchronized boolean getPadCharsWithSpace() {
  889. return this.currentConnection.getPadCharsWithSpace();
  890. }
  891. public synchronized boolean getParanoid() {
  892. return this.currentConnection.getParanoid();
  893. }
  894. public synchronized boolean getPedantic() {
  895. return this.currentConnection.getPedantic();
  896. }
  897. public synchronized boolean getPinGlobalTxToPhysicalConnection() {
  898. return this.currentConnection.getPinGlobalTxToPhysicalConnection();
  899. }
  900. public synchronized boolean getPopulateInsertRowWithDefaultValues() {
  901. return this.currentConnection.getPopulateInsertRowWithDefaultValues();
  902. }
  903. public synchronized int getPrepStmtCacheSize() {
  904. return this.currentConnection.getPrepStmtCacheSize();
  905. }
  906. public synchronized int getPrepStmtCacheSqlLimit() {
  907. return this.currentConnection.getPrepStmtCacheSqlLimit();
  908. }
  909. public synchronized int getPreparedStatementCacheSize() {
  910. return this.currentConnection.getPreparedStatementCacheSize();
  911. }
  912. public synchronized int getPreparedStatementCacheSqlLimit() {
  913. return this.currentConnection.getPreparedStatementCacheSqlLimit();
  914. }
  915. public synchronized boolean getProcessEscapeCodesForPrepStmts() {
  916. return this.currentConnection.getProcessEscapeCodesForPrepStmts();
  917. }
  918. public synchronized boolean getProfileSQL() {
  919. return this.currentConnection.getProfileSQL();
  920. }
  921. public synchronized boolean getProfileSql() {
  922. return this.currentConnection.getProfileSql();
  923. }
  924. public synchronized String getProfilerEventHandler() {
  925. return this.currentConnection.getProfilerEventHandler();
  926. }
  927. public synchronized String getPropertiesTransform() {
  928. return this.currentConnection.getPropertiesTransform();
  929. }
  930. public synchronized int getQueriesBeforeRetryMaster() {
  931. return this.currentConnection.getQueriesBeforeRetryMaster();
  932. }
  933. public synchronized boolean getReconnectAtTxEnd() {
  934. return this.currentConnection.getReconnectAtTxEnd();
  935. }
  936. public synchronized boolean getRelaxAutoCommit() {
  937. return this.currentConnection.getRelaxAutoCommit();
  938. }
  939. public synchronized int getReportMetricsIntervalMillis() {
  940. return this.currentConnection.getReportMetricsIntervalMillis();
  941. }
  942. public synchronized boolean getRequireSSL() {
  943. return this.currentConnection.getRequireSSL();
  944. }
  945. public synchronized String getResourceId() {
  946. return this.currentConnection.getResourceId();
  947. }
  948. public synchronized int getResultSetSizeThreshold() {
  949. return this.currentConnection.getResultSetSizeThreshold();
  950. }
  951. public synchronized boolean getRewriteBatchedStatements() {
  952. return this.currentConnection.getRewriteBatchedStatements();
  953. }
  954. public synchronized boolean getRollbackOnPooledClose() {
  955. return this.currentConnection.getRollbackOnPooledClose();
  956. }
  957. public synchronized boolean getRoundRobinLoadBalance() {
  958. return this.currentConnection.getRoundRobinLoadBalance();
  959. }
  960. public synchronized boolean getRunningCTS13() {
  961. return this.currentConnection.getRunningCTS13();
  962. }
  963. public synchronized int getSecondsBeforeRetryMaster() {
  964. return this.currentConnection.getSecondsBeforeRetryMaster();
  965. }
  966. public synchronized int getSelfDestructOnPingMaxOperations() {
  967. return this.currentConnection.getSelfDestructOnPingMaxOperations();
  968. }
  969. public synchronized int getSelfDestructOnPingSecondsLifetime() {
  970. return this.currentConnection.getSelfDestructOnPingSecondsLifetime();
  971. }
  972. public synchronized String getServerTimezone() {
  973. return this.currentConnection.getServerTimezone();
  974. }
  975. public synchronized String getSessionVariables() {
  976. return this.currentConnection.getSessionVariables();
  977. }
  978. public synchronized int getSlowQueryThresholdMillis() {
  979. return this.currentConnection.getSlowQueryThresholdMillis();
  980. }
  981. public synchronized long getSlowQueryThresholdNanos() {
  982. return this.currentConnection.getSlowQueryThresholdNanos();
  983. }
  984. public synchronized String getSocketFactory() {
  985. return this.currentConnection.getSocketFactory();
  986. }
  987. public synchronized String getSocketFactoryClassName() {
  988. return this.currentConnection.getSocketFactoryClassName();
  989. }
  990. public synchronized int getSocketTimeout() {
  991. return this.currentConnection.getSocketTimeout();
  992. }
  993. public synchronized String getStatementInterceptors() {
  994. return this.currentConnection.getStatementInterceptors();
  995. }
  996. public synchronized boolean getStrictFloatingPoint() {
  997. return this.currentConnection.getStrictFloatingPoint();
  998. }
  999. public synchronized boolean getStrictUpdates() {
  1000. return this.currentConnection.getStrictUpdates();
  1001. }
  1002. public synchronized boolean getTcpKeepAlive() {
  1003. return this.currentConnection.getTcpKeepAlive();
  1004. }
  1005. public synchronized boolean getTcpNoDelay() {
  1006. return this.currentConnection.getTcpNoDelay();
  1007. }
  1008. public synchronized int getTcpRcvBuf() {
  1009. return this.currentConnection.getTcpRcvBuf();
  1010. }
  1011. public synchronized int getTcpSndBuf() {
  1012. return this.currentConnection.getTcpSndBuf();
  1013. }
  1014. public synchronized int getTcpTrafficClass() {
  1015. return this.currentConnection.getTcpTrafficClass();
  1016. }
  1017. public synchronized boolean getTinyInt1isBit() {
  1018. return this.currentConnection.getTinyInt1isBit();
  1019. }
  1020. public synchronized boolean getTraceProtocol() {
  1021. return this.currentConnection.getTraceProtocol();
  1022. }
  1023. public synchronized boolean getTransformedBitIsBoolean() {
  1024. return this.currentConnection.getTransformedBitIsBoolean();
  1025. }
  1026. public synchronized boolean getTreatUtilDateAsTimestamp() {
  1027. return this.currentConnection.getTreatUtilDateAsTimestamp();
  1028. }
  1029. public synchronized String getTrustCertificateKeyStorePassword() {
  1030. return this.currentConnection.getTrustCertificateKeyStorePassword();
  1031. }
  1032. public synchronized String getTrustCertificateKeyStoreType() {
  1033. return this.currentConnection.getTrustCertificateKeyStoreType();
  1034. }
  1035. public synchronized String getTrustCertificateKeyStoreUrl() {
  1036. return this.currentConnection.getTrustCertificateKeyStoreUrl();
  1037. }
  1038. public synchronized boolean getUltraDevHack() {
  1039. return this.currentConnection.getUltraDevHack();
  1040. }
  1041. public synchronized boolean getUseBlobToStoreUTF8OutsideBMP() {
  1042. return this.currentConnection.getUseBlobToStoreUTF8OutsideBMP();
  1043. }
  1044. public synchronized boolean getUseCompression() {
  1045. return this.currentConnection.getUseCompression();
  1046. }
  1047. public synchronized String getUseConfigs() {
  1048. return this.currentConnection.getUseConfigs();
  1049. }
  1050. public synchronized boolean getUseCursorFetch() {
  1051. return this.currentConnection.getUseCursorFetch();
  1052. }
  1053. public synchronized boolean getUseDirectRowUnpack() {
  1054. return this.currentConnection.getUseDirectRowUnpack();
  1055. }
  1056. public synchronized boolean getUseDynamicCharsetInfo() {
  1057. return this.currentConnection.getUseDynamicCharsetInfo();
  1058. }
  1059. public synchronized boolean getUseFastDateParsing() {
  1060. return this.currentConnection.getUseFastDateParsing();
  1061. }
  1062. public synchronized boolean getUseFastIntParsing() {
  1063. return this.currentConnection.getUseFastIntParsing();
  1064. }
  1065. public synchronized boolean getUseGmtMillisForDatetimes() {
  1066. return this.currentConnection.getUseGmtMillisForDatetimes();
  1067. }
  1068. public synchronized boolean getUseHostsInPrivileges() {
  1069. return this.currentConnection.getUseHostsInPrivileges();
  1070. }
  1071. public synchronized boolean getUseInformationSchema() {
  1072. return this.currentConnection.getUseInformationSchema();
  1073. }
  1074. public synchronized boolean getUseJDBCCompliantTimezoneShift() {
  1075. return this.currentConnection.getUseJDBCCompliantTimezoneShift();
  1076. }
  1077. public synchronized boolean getUseJvmCharsetConverters() {
  1078. return this.currentConnection.getUseJvmCharsetConverters();
  1079. }
  1080. public synchronized boolean getUseLegacyDatetimeCode() {
  1081. return this.currentConnection.getUseLegacyDatetimeCode();
  1082. }
  1083. public synchronized boolean getUseLocalSessionState() {
  1084. return this.currentConnection.getUseLocalSessionState();
  1085. }
  1086. public synchronized boolean getUseNanosForElapsedTime() {
  1087. return this.currentConnection.getUseNanosForElapsedTime();
  1088. }
  1089. public synchronized boolean getUseOldAliasMetadataBehavior() {
  1090. return this.currentConnection.getUseOldAliasMetadataBehavior();
  1091. }
  1092. public synchronized boolean getUseOldUTF8Behavior() {
  1093. return this.currentConnection.getUseOldUTF8Behavior();
  1094. }
  1095. public synchronized boolean getUseOnlyServerErrorMessages() {
  1096. return this.currentConnection.getUseOnlyServerErrorMessages();
  1097. }
  1098. public synchronized boolean getUseReadAheadInput() {
  1099. return this.currentConnection.getUseReadAheadInput();
  1100. }
  1101. public synchronized boolean getUseSSL() {
  1102. return this.currentConnection.getUseSSL();
  1103. }
  1104. public synchronized boolean getUseSSPSCompatibleTimezoneShift() {
  1105. return this.currentConnection.getUseSSPSCompatibleTimezoneShift();
  1106. }
  1107. public synchronized boolean getUseServerPrepStmts() {
  1108. return this.currentConnection.getUseServerPrepStmts();
  1109. }
  1110. public synchronized boolean getUseServerPreparedStmts() {
  1111. return this.currentConnection.getUseServerPreparedStmts();
  1112. }
  1113. public synchronized boolean getUseSqlStateCodes() {
  1114. return this.currentConnection.getUseSqlStateCodes();
  1115. }
  1116. public synchronized boolean getUseStreamLengthsInPrepStmts() {
  1117. return this.currentConnection.getUseStreamLengthsInPrepStmts();
  1118. }
  1119. public synchronized boolean getUseTimezone() {
  1120. return this.currentConnection.getUseTimezone();
  1121. }
  1122. public synchronized boolean getUseUltraDevWorkAround() {
  1123. return this.currentConnection.getUseUltraDevWorkAround();
  1124. }
  1125. public synchronized boolean getUseUnbufferedInput() {
  1126. return this.currentConnection.getUseUnbufferedInput();
  1127. }
  1128. public synchronized boolean getUseUnicode() {
  1129. return this.currentConnection.getUseUnicode();
  1130. }
  1131. public synchronized boolean getUseUsageAdvisor() {
  1132. return this.currentConnection.getUseUsageAdvisor();
  1133. }
  1134. public synchronized String getUtf8OutsideBmpExcludedColumnNamePattern() {
  1135. return this.currentConnection.getUtf8OutsideBmpExcludedColumnNamePattern();
  1136. }
  1137. public synchronized String getUtf8OutsideBmpIncludedColumnNamePattern() {
  1138. return this.currentConnection.getUtf8OutsideBmpIncludedColumnNamePattern();
  1139. }
  1140. public synchronized boolean getVerifyServerCertificate() {
  1141. return this.currentConnection.getVerifyServerCertificate();
  1142. }
  1143. public synchronized boolean getYearIsDateType() {
  1144. return this.currentConnection.getYearIsDateType();
  1145. }
  1146. public synchronized String getZeroDateTimeBehavior() {
  1147. return this.currentConnection.getZeroDateTimeBehavior();
  1148. }
  1149. public synchronized void setAllowLoadLocalInfile(boolean property) {
  1150. // not runtime configurable
  1151. }
  1152. public synchronized void setAllowMultiQueries(boolean property) {
  1153. // not runtime configurable
  1154. }
  1155. public synchronized void setAllowNanAndInf(boolean flag) {
  1156. // not runtime configurable
  1157. }
  1158. public synchronized void setAllowUrlInLocalInfile(boolean flag) {
  1159. // not runtime configurable
  1160. }
  1161. public synchronized void setAlwaysSendSetIsolation(boolean flag) {
  1162. // not runtime configurable
  1163. }
  1164. public synchronized void setAutoClosePStmtStreams(boolean flag) {
  1165. // not runtime configurable
  1166. }
  1167. public synchronized void setAutoDeserialize(boolean flag) {
  1168. // not runtime configurable
  1169. }
  1170. public synchronized void setAutoGenerateTestcaseScript(boolean flag) {
  1171. // not runtime configurable
  1172. }
  1173. public synchronized void setAutoReconnect(boolean flag) {
  1174. // not runtime configurable
  1175. }
  1176. public synchronized void setAutoReconnectForConnectionPools(boolean property) {
  1177. // not runtime configurable
  1178. }
  1179. public synchronized void setAutoReconnectForPools(boolean flag) {
  1180. // not runtime configurable
  1181. }
  1182. public synchronized void setAutoSlowLog(boolean flag) {
  1183. // not runtime configurable
  1184. }
  1185. public synchronized void setBlobSendChunkSize(String value) throws SQLException {
  1186. // not runtime configurable
  1187. }
  1188. public synchronized void setBlobsAreStrings(boolean flag) {
  1189. // not runtime configurable
  1190. }
  1191. public synchronized void setCacheCallableStatements(boolean flag) {
  1192. // not runtime configurable
  1193. }
  1194. public synchronized void setCacheCallableStmts(boolean flag) {
  1195. // not runtime configurable
  1196. }
  1197. public synchronized void setCachePrepStmts(boolean flag) {
  1198. // not runtime configurable
  1199. }
  1200. public synchronized void setCachePreparedStatements(boolean flag) {
  1201. // not runtime configurable
  1202. }
  1203. public synchronized void setCacheResultSetMetadata(boolean property) {
  1204. // not runtime configurable
  1205. }
  1206. public synchronized void setCacheServerConfiguration(boolean flag) {
  1207. // not runtime configurable
  1208. }
  1209. public synchronized void setCallableStatementCacheSize(int size) {
  1210. // not runtime configurable
  1211. }
  1212. public synchronized void setCallableStmtCacheSize(int cacheSize) {
  1213. // not runtime configurable
  1214. }
  1215. public synchronized void setCapitalizeDBMDTypes(boolean property) {
  1216. // not runtime configurable
  1217. }
  1218. public synchronized void setCapitalizeTypeNames(boolean flag) {
  1219. // not runtime configurable
  1220. }
  1221. public synchronized void setCharacterEncoding(String encoding) {
  1222. // not runtime configurable
  1223. }
  1224. public synchronized void setCharacterSetResults(String characterSet) {
  1225. // not runtime configurable
  1226. }
  1227. public synchronized void setClientCertificateKeyStorePassword(String value) {
  1228. // not runtime configurable
  1229. }
  1230. public synchronized void setClientCertificateKeyStoreType(String value) {
  1231. // not runtime configurable
  1232. }
  1233. public synchronized void setClientCertificateKeyStoreUrl(String value) {
  1234. // not runtime configurable
  1235. }
  1236. public synchronized void setClientInfoProvider(String classname) {
  1237. // not runtime configurable
  1238. }
  1239. public synchronized void setClobCharacterEncoding(String encoding) {
  1240. // not runtime configurable
  1241. }
  1242. public synchronized void setClobberStreamingResults(boolean flag) {
  1243. // not runtime configurable
  1244. }
  1245. public synchronized void setConnectTimeout(int timeoutMs) {
  1246. // not runtime configurable
  1247. }
  1248. public synchronized void setConnectionCollation(String collation) {
  1249. // not runtime configurable
  1250. }
  1251. public synchronized void setConnectionLifecycleInterceptors(String interceptors) {
  1252. // not runtime configurable
  1253. }
  1254. public synchronized void setContinueBatchOnError(boolean property) {
  1255. // not runtime configurable
  1256. }
  1257. public synchronized void setCreateDatabaseIfNotExist(boolean flag) {
  1258. // not runtime configurable
  1259. }
  1260. public synchronized void setDefaultFetchSize(int n) {
  1261. // not runtime configurable
  1262. }
  1263. public synchronized void setDetectServerPreparedStmts(boolean property) {
  1264. // not runtime configurable
  1265. }
  1266. public synchronized void setDontTrackOpenResources(boolean flag) {
  1267. // not runtime configurable
  1268. }
  1269. public synchronized void setDumpMetadataOnColumnNotFound(boolean flag) {
  1270. // not runtime configurable
  1271. }
  1272. public synchronized void setDumpQueriesOnException(boolean flag) {
  1273. // not runtime configurable
  1274. }
  1275. public synchronized void setDynamicCalendars(boolean flag) {
  1276. // not runtime configurable
  1277. }
  1278. public synchronized void setElideSetAutoCommits(boolean flag) {
  1279. // not runtime configurable
  1280. }
  1281. public synchronized void setEmptyStringsConvertToZero(boolean flag) {
  1282. // not runtime configurable
  1283. }
  1284. public synchronized void setEmulateLocators(boolean property) {
  1285. // not runtime configurable
  1286. }
  1287. public synchronized void setEmulateUnsupportedPstmts(boolean flag) {
  1288. // not runtime configurable
  1289. }
  1290. public synchronized void setEnablePacketDebug(boolean flag) {
  1291. // not runtime configurable
  1292. }
  1293. public synchronized void setEnableQueryTimeouts(boolean flag) {
  1294. // not runtime configurable
  1295. }
  1296. public synchronized void setEncoding(String property) {
  1297. // not runtime configurable
  1298. }
  1299. public synchronized void setExplainSlowQueries(boolean flag) {
  1300. // not runtime configurable
  1301. }
  1302. public synchronized void setFailOverReadOnly(boolean flag) {
  1303. // not runtime configurable
  1304. }
  1305. public synchronized void setFunctionsNeverReturnBlobs(boolean flag) {
  1306. // not runtime configurable
  1307. }
  1308. public synchronized void setGatherPerfMetrics(boolean flag) {
  1309. // not runtime configurable
  1310. }
  1311. public synchronized void setGatherPerformanceMetrics(boolean flag) {
  1312. // not runtime configurable
  1313. }
  1314. public synchronized void setGenerateSimpleParameterMetadata(boolean flag) {
  1315. // not runtime configurable
  1316. }
  1317. public synchronized void setHoldResultsOpenOverStatementClose(boolean flag) {
  1318. // not runtime configurable
  1319. }
  1320. public synchronized void setIgnoreNonTxTables(boolean property) {
  1321. // not runtime configurable
  1322. }
  1323. public synchronized void setIncludeInnodbStatusInDeadlockExceptions(boolean flag) {
  1324. // not runtime configurable
  1325. }
  1326. public synchronized void setInitialTimeout(int property) {
  1327. // not runtime configurable
  1328. }
  1329. public synchronized void setInteractiveClient(boolean property) {
  1330. // not runtime configurable
  1331. }
  1332. public synchronized void setIsInteractiveClient(boolean property) {
  1333. // not runtime configurable
  1334. }
  1335. public synchronized void setJdbcCompliantTruncation(boolean flag) {
  1336. // not runtime configurable
  1337. }
  1338. public synchronized void setJdbcCompliantTruncationForReads(
  1339. boolean jdbcCompliantTruncationForReads) {
  1340. // not runtime configurable
  1341. }
  1342. public synchronized void setLargeRowSizeThreshold(String value) {
  1343. // not runtime configurable
  1344. }
  1345. public synchronized void setLoadBalanceStrategy(String strategy) {
  1346. // not runtim…

Large files files are truncated, but you can click here to view the full file