@Description(value="describe a datasource pool") public class JMXBasicDataSource extends java.lang.Object
Constructor and Description |
---|
JMXBasicDataSource(java.lang.String name,
BasicDataSource ds) |
public JMXBasicDataSource(java.lang.String name, BasicDataSource ds)
public void unregister()
@ManagedAttribute @Description(value="The class driver name.") public java.lang.String getDriverClassName()
@ManagedAttribute @Description(value="The connection URL to be passed to our JDBC driver to establish a connection.") public java.lang.String getUrl()
@ManagedAttribute @Description(value="The SQL query that will be used to validate connections from this pool before returning them to the caller.") public java.lang.String getValidationQuery()
@ManagedAttribute @Description(value="The connection username to be passed to our JDBC driver to establish a connection.") public java.lang.String getUsername()
@ManagedAttribute @Description(value="Timeout in seconds before connection validation queries fail.") public int getValidationQueryTimeout()
@ManagedAttribute @Description(value="The initial number of connections that are created when the pool is started.") public int getInitialSize()
@ManagedAttribute @Description(value="The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.") public int getMaxActive()
@ManagedAttribute @Description(value="The maximum number of connections that can remain idle in the pool, without extra ones beingdestroyed, or negative for no limit.") public int getMaxIdle()
@ManagedAttribute @Description(value="The minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.") public int getMinIdle()
@ManagedAttribute @Description(value="The minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.") public int getNumTestsPerEvictionRun()
@ManagedAttribute @Description(value="The minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any).") public long getMinEvictableIdleTimeMillis()
@ManagedAttribute @Description(value="The number of milliseconds to sleep between runs of the idle object evictor thread.") public long getTimeBetweenEvictionRunsMillis()
@ManagedAttribute @Description(value="The maximum number of open statements that can be allocated from the statement pool at the same time, or non-positive for no limit.") public int getMaxOpenPreparedStatements()
@ManagedAttribute @Description(value="The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or <= 0 to wait indefinitely.") public long getMaxWait()
@ManagedAttribute @Description(value="The default auto-commit state of connections created by this pool.") public boolean getDefaultAutoCommit()
@ManagedAttribute @Description(value="Prepared statement pooling for this pool.") public boolean getPoolPreparedStatements()
@ManagedAttribute @Description(value="The indication of whether objects will be validated before being borrowed from the pool.") public boolean getTestOnBorrow()
@ManagedAttribute @Description(value="The indication of whether objects will be validated before being returned to the pool.") public boolean getTestOnReturn()
@ManagedAttribute @Description(value="The indication of whether objects will be validated by the idle object evictor (if any).") public boolean getTestWhileIdle()
@ManagedAttribute @Description(value="The default \"catalog\" of connections created by this pool.") public java.lang.String getDefaultCatalog()
@ManagedAttribute @Description(value="The default read-only state of connections created by this pool.") public boolean getDefaultReadOnly()
@ManagedAttribute @Description(value="The default TransactionIsolation state of connections created by this pool.") public int getDefaultTransactionIsolation()
@ManagedAttribute @Description(value="The number of active connections in the pool.") public int getNumActive()
@ManagedAttribute @Description(value="The number of idle connections in the pool.") public int getNumIdle()
@ManagedOperation @Description(value="Execute the validation query.") public java.lang.String executeValidationQuery()
@ManagedAttribute @Description(value="Set the class driver.") public void setDriverClassName(java.lang.String name)
@ManagedAttribute @Description(value="Set the connection URL.") public void setUrl(java.lang.String url)
@ManagedAttribute @Description(value="Set the SQL validation query.") public void setValidationQuery(java.lang.String query)
@ManagedAttribute @Description(value="Set the connection username to be passed to our JDBC driver to establish a connection.") public void setUsername(java.lang.String user)
@ManagedAttribute @Description(value="Set the timeout in seconds before connection validation queries fail.") public void setValidationQueryTimeout(int timeout)
@ManagedAttribute @Description(value="Set the initial number of connections that are created when the pool is started.") public void setInitialSize(int size)
@ManagedAttribute @Description(value="Set the maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.") public void setMaxActive(int max)
@ManagedAttribute @Description(value="Set the maximum number of connections that can remain idle in the pool, without extra ones beingdestroyed, or negative for no limit.") public void setMaxIdle(int max)
@ManagedAttribute @Description(value="Set the minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.") public void setMinIdle(int min)
@ManagedAttribute @Description(value="Set the minimum number of active connections that can remain idle in the pool, without extra ones being created when the evictor runs, or 0 to create none.") public void setNumTestsPerEvictionRun(int num)
@ManagedAttribute @Description(value="Set the minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any).") public void setMinEvictableIdleTimeMillis(long time)
@ManagedAttribute @Description(value="Set the number of milliseconds to sleep between runs of the idle object evictor thread.") public void setTimeBetweenEvictionRunsMillis(long time)
@ManagedAttribute @Description(value="Set the maximum number of open statements that can be allocated from the statement pool at the same time, or non-positive for no limit.") public void setMaxOpenPreparedStatements(int max)
@ManagedAttribute @Description(value="Set the maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or <= 0 to wait indefinitely.") public void setMaxWait(long max)
@ManagedAttribute @Description(value="Set the default auto-commit state of connections created by this pool.") public void setDefaultAutoCommit(boolean auto)
@ManagedAttribute @Description(value="Set the prepared statement pooling for this pool.") public void setPoolPreparedStatements(boolean pool)
@ManagedAttribute @Description(value="Set the indication of whether objects will be validated before being borrowed from the pool.") public void setTestOnBorrow(boolean test)
@ManagedAttribute @Description(value="Set the indication of whether objects will be validated before being returned to the pool.") public void setTestOnReturn(boolean test)
@ManagedAttribute @Description(value="Set the indication of whether objects will be validated by the idle object evictor (if any).") public void setTestWhileIdle(boolean test)
@ManagedAttribute @Description(value="The default \"catalog\" of connections created by this pool.") public void setDefaultCatalog(java.lang.String catalog)
@ManagedAttribute @Description(value="Set the default read-only state of connections created by this pool.") public void setDefaultReadOnly(boolean ro)
@ManagedAttribute @Description(value="Set the default TransactionIsolation state of connections created by this pool ([NONE: 0, READ_COMMITTED: 2, READ_UNCOMMITTED: 4, SERIALIZABLE: 8]).") public void setDefaultTransactionIsolation(int level)