public class DataSourceElement
extends org.apache.jmeter.testelement.AbstractTestElement
implements org.apache.jmeter.config.ConfigElement, org.apache.jmeter.testelement.TestStateListener, org.apache.jmeter.testbeans.TestBean
| Constructor and Description |
|---|
DataSourceElement() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfigElement(org.apache.jmeter.config.ConfigElement config) |
Object |
clone() |
boolean |
expectsModification() |
String |
getCheckQuery() |
static Connection |
getConnection(String poolName)
Utility routine to get the connection from the pool.
Purpose: allows JDBCSampler to be entirely independent of the pooling classes allows the pool storage mechanism to be changed if necessary |
String |
getConnectionAge() |
static String |
getConnectionInfo(String poolName)
Gets a textual description about the pools configuration.
|
String |
getConnectionProperties() |
String |
getDataSource() |
String |
getDbUrl() |
String |
getDriver() |
String |
getInitQuery() |
String |
getPassword() |
String |
getPoolMax() |
String |
getPoolPreparedStatements()
Return the max number of pooled prepared statements.
|
String |
getTimeout() |
String |
getTransactionIsolation() |
String |
getTrimInterval() |
String |
getUsername() |
boolean |
isAutocommit() |
boolean |
isKeepAlive() |
boolean |
isPreinit() |
void |
setAutocommit(boolean autocommit) |
void |
setCheckQuery(String checkQuery) |
void |
setConnectionAge(String connectionAge) |
void |
setConnectionProperties(String connectionProperties) |
void |
setDataSource(String dataSource) |
void |
setDbUrl(String dbUrl) |
void |
setDriver(String driver) |
void |
setInitQuery(String initQuery) |
void |
setKeepAlive(boolean keepAlive) |
void |
setPassword(String password) |
void |
setPoolMax(String poolMax) |
void |
setPoolPreparedStatements(String poolPreparedStatements)
Set the max number of pooled prepared statements.
|
void |
setPreinit(boolean preinit) |
void |
setTimeout(String timeout) |
void |
setTransactionIsolation(String transactionIsolation) |
void |
setTrimInterval(String trimInterval) |
void |
setUsername(String username) |
void |
testEnded() |
void |
testEnded(String host) |
void |
testStarted() |
void |
testStarted(String host) |
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertypublic void testEnded()
testEnded in interface org.apache.jmeter.testelement.TestStateListenerpublic void testEnded(String host)
testEnded in interface org.apache.jmeter.testelement.TestStateListenerpublic void testStarted()
testStarted in interface org.apache.jmeter.testelement.TestStateListenerpublic void testStarted(String host)
testStarted in interface org.apache.jmeter.testelement.TestStateListenerpublic Object clone()
clone in interface org.apache.jmeter.config.ConfigElementclone in interface org.apache.jmeter.testelement.TestElementclone in class org.apache.jmeter.testelement.AbstractTestElementpublic static String getConnectionInfo(String poolName) throws SQLException
poolName - Pool namepoolName or a short message,
when the JMeter object specified by poolName is not a
poolSQLException - when an error occurs, while gathering information about the
connectionpublic static Connection getConnection(String poolName) throws SQLException
poolName - name of the pool to get a connection fromSQLException - when an error occurs while getting the connection from the
poolpublic void addConfigElement(org.apache.jmeter.config.ConfigElement config)
addConfigElement in interface org.apache.jmeter.config.ConfigElementpublic boolean expectsModification()
expectsModification in interface org.apache.jmeter.config.ConfigElementpublic String getCheckQuery()
public void setCheckQuery(String checkQuery)
checkQuery - The checkQuery to set.public String getConnectionAge()
public void setConnectionAge(String connectionAge)
connectionAge - The connectionAge to set.public String getDataSource()
public void setDataSource(String dataSource)
dataSource - The poolname to set.public String getDbUrl()
public void setDbUrl(String dbUrl)
dbUrl - The dbUrl to set.public String getDriver()
public void setDriver(String driver)
driver - The driver to set.public String getPassword()
public void setPassword(String password)
password - The password to set.public String getPoolMax()
public void setPoolMax(String poolMax)
poolMax - The poolMax to set.public String getTimeout()
public void setTimeout(String timeout)
timeout - The timeout to set.public String getTrimInterval()
public void setTrimInterval(String trimInterval)
trimInterval - The trimInterval to set.public String getUsername()
public void setUsername(String username)
username - The username to set.public boolean isAutocommit()
public void setAutocommit(boolean autocommit)
autocommit - The autocommit to set.public boolean isPreinit()
public void setPreinit(boolean preinit)
preinit - The preinit to set.public boolean isKeepAlive()
public void setKeepAlive(boolean keepAlive)
keepAlive - The keepAlive to set.public String getTransactionIsolation()
public void setTransactionIsolation(String transactionIsolation)
transactionIsolation - The transaction isolation level to set. NULL to
use the default of the driver.public String getInitQuery()
public void setInitQuery(String initQuery)
initQuery - the initQuery to setpublic String getConnectionProperties()
public void setConnectionProperties(String connectionProperties)
connectionProperties - the connectionProperties to setpublic String getPoolPreparedStatements()
public void setPoolPreparedStatements(String poolPreparedStatements)
poolPreparedStatements - max number of prepared statementsCopyright © 1998-2022 Apache Software Foundation. All Rights Reserved.