本文整理汇总了Java中com.mysql.jdbc.ConnectionProperties类的典型用法代码示例。如果您正苦于以下问题:Java ConnectionProperties类的具体用法?Java ConnectionProperties怎么用?Java ConnectionProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConnectionProperties类属于com.mysql.jdbc包,在下文中一共展示了ConnectionProperties类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUseOldAliasMetadataBehavior
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setUseOldAliasMetadataBehavior(boolean flag) {
super.setUseOldAliasMetadataBehavior(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setUseOldAliasMetadataBehavior(flag);
}
}
示例2: setNetTimeoutForStreamingResults
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setNetTimeoutForStreamingResults(int value) throws SQLException {
super.setNetTimeoutForStreamingResults(value);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setNetTimeoutForStreamingResults(value);
}
}
示例3: setNullNamePatternMatchesAll
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setNullNamePatternMatchesAll(boolean value) {
super.setNullNamePatternMatchesAll(value);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setNullNamePatternMatchesAll(value);
}
}
示例4: setRequireSSL
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setRequireSSL(boolean property) {
super.setRequireSSL(property);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setRequireSSL(property);
}
}
示例5: setLoadBalanceExceptionChecker
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setLoadBalanceExceptionChecker(String loadBalanceExceptionChecker) {
super.setLoadBalanceExceptionChecker(loadBalanceExceptionChecker);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setLoadBalanceExceptionChecker(loadBalanceExceptionChecker);
}
}
示例6: setProfileSQL
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setProfileSQL(boolean flag) {
super.setProfileSQL(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setProfileSQL(flag);
}
}
示例7: setLoggerClassName
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setLoggerClassName(String className) {
super.setLoggerClassName(className);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setLoggerClassName(className);
}
}
示例8: setEnableQueryTimeouts
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setEnableQueryTimeouts(boolean flag) {
super.setEnableQueryTimeouts(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setEnableQueryTimeouts(flag);
}
}
示例9: testBug74711
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
/**
* Tests fix for Bug#74711 - FORGOTTEN WORKAROUND FOR BUG#36326.
*
* This test requires a server started with the options '--query_cache_type=1' and '--query_cache_size=N', (N > 0).
*/
public void testBug74711() throws Exception {
if (!((ConnectionImpl) this.conn).isQueryCacheEnabled()) {
System.err.println("Warning! testBug77411() requires a server supporting a query cache.");
return;
}
this.rs = this.stmt.executeQuery("SELECT @@global.query_cache_type, @@global.query_cache_size");
this.rs.next();
if (!"ON".equalsIgnoreCase(this.rs.getString(1)) || "0".equals(this.rs.getString(2))) {
System.err
.println("Warning! testBug77411() requires a server started with the options '--query_cache_type=1' and '--query_cache_size=N', (N > 0).");
return;
}
boolean useLocTransSt = false;
boolean useElideSetAC = false;
do {
final String testCase = String.format("Case: [LocTransSt: %s, ElideAC: %s ]", useLocTransSt ? "Y" : "N", useElideSetAC ? "Y" : "N");
final Properties props = new Properties();
props.setProperty("useLocalTransactionState", Boolean.toString(useLocTransSt));
props.setProperty("elideSetAutoCommits", Boolean.toString(useElideSetAC));
Connection testConn = getConnectionWithProps(props);
assertEquals(testCase, useLocTransSt, ((ConnectionProperties) testConn).getUseLocalTransactionState());
// 'elideSetAutoCommits' feature was turned off due to Server Bug#66884. See also ConnectionPropertiesImpl#getElideSetAutoCommits().
assertFalse(testCase, ((ConnectionProperties) testConn).getElideSetAutoCommits());
// TODO Turn this test back on as soon as the server bug is fixed. Consider making it version specific.
// assertEquals(testCase, useElideSetAC, ((ConnectionProperties) testConn).getElideSetAutoCommits());
testConn.close();
} while ((useLocTransSt = !useLocTransSt) || (useElideSetAC = !useElideSetAC));
}
示例10: setProcessEscapeCodesForPrepStmts
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setProcessEscapeCodesForPrepStmts(boolean flag) {
super.setProcessEscapeCodesForPrepStmts(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setProcessEscapeCodesForPrepStmts(flag);
}
}
示例11: setIncludeInnodbStatusInDeadlockExceptions
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setIncludeInnodbStatusInDeadlockExceptions(boolean flag) {
super.setIncludeInnodbStatusInDeadlockExceptions(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setIncludeInnodbStatusInDeadlockExceptions(flag);
}
}
示例12: setRunningCTS13
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setRunningCTS13(boolean flag) {
super.setRunningCTS13(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setRunningCTS13(flag);
}
}
示例13: setQueryTimeoutKillsConnection
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setQueryTimeoutKillsConnection(boolean queryTimeoutKillsConnection) {
super.setQueryTimeoutKillsConnection(queryTimeoutKillsConnection);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setQueryTimeoutKillsConnection(queryTimeoutKillsConnection);
}
}
示例14: setUseHostsInPrivileges
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setUseHostsInPrivileges(boolean property) {
super.setUseHostsInPrivileges(property);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setUseHostsInPrivileges(property);
}
}
示例15: setRoundRobinLoadBalance
import com.mysql.jdbc.ConnectionProperties; //导入依赖的package包/类
@Override
public void setRoundRobinLoadBalance(boolean flag) {
super.setRoundRobinLoadBalance(flag);
for (ConnectionProperties cp : this.serverConnections.values()) {
cp.setRoundRobinLoadBalance(flag);
}
}