|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dataforte.cassandra.pool.DataSourceProxy
net.dataforte.cassandra.pool.DataSource
public class DataSource
A DataSource that can be instantiated through IoC and implements the
CassandraThriftDataSource interface since the DataSourceProxy is used as a generic proxy.
The DataSource simply wraps a ConnectionPool in order to provide a
standard interface to the user.
| Field Summary | |
|---|---|
protected ObjectName |
oname
|
| Fields inherited from class net.dataforte.cassandra.pool.DataSourceProxy |
|---|
pool, poolProperties |
| Constructor Summary | |
|---|---|
DataSource()
Constructor for reflection only. |
|
DataSource(PoolConfiguration poolProperties)
Constructs a DataSource object wrapping a connection |
|
| Method Summary | |
|---|---|
ObjectName |
createObjectName(ObjectName original)
Creates the ObjectName for the ConnectionPoolMBean object to be registered |
Object |
get(String name)
Provides a generic getter for any of the declared properties of the PoolConfiguration |
int |
getAbandonWhenPercentageFull()
Connections that have been abandoned (timed out) wont get closed and reported up unless the number of connections in use are above the percentage defined by abandonWhenPercentageFull. |
String[] |
getConfiguredHosts()
Returns an array of configured hosts (may be different from the actual list if dynamic discovery is enabled) |
Object |
getDataSource()
Returns a datasource, if one exists that is being used to create connections. |
String |
getDataSourceJNDI()
Returns the JNDI string configured for data source usage. |
HostFailoverPolicy |
getFailoverPolicy()
Returns the failover policy. |
String |
getHost()
Returns the Cassandra hosts |
long |
getHostRetryInterval()
Returns the interval in milliseconds before retrying a host to which a connection has failed in the past. |
int |
getInitialSize()
Returns the number of connections that will be established when the connection pool is started. |
String |
getKeySpace()
Returns the keyspace |
int |
getMaxActive()
The maximum number of active connections that can be allocated from this pool at the same time. |
long |
getMaxAge()
Time in milliseconds to keep this connection alive even when used. |
int |
getMaxIdle()
The maximum number of connections that should be kept in the idle pool if PoolConfiguration.isPoolSweeperEnabled() returns false. |
int |
getMaxWait()
The maximum number of milliseconds that the pool will wait (when there are no available connections and the PoolConfiguration.getMaxActive() has been reached) for a connection to be returned
before throwing an exception. |
int |
getMinEvictableIdleTimeMillis()
The minimum amount of time an object must sit idle in the pool before it is eligible for eviction. |
int |
getMinIdle()
The minimum number of established connections that should be kept in the pool at all times. |
String |
getName()
Returns the name of the connection pool. |
int |
getNumTestsPerEvictionRun()
Property not used |
String |
getPassword()
Returns the password used when establishing connections to the database. |
String |
getPoolName()
|
int |
getPort()
Returns the Cassandra port (defaults to 9160) |
int |
getRemoveAbandonedTimeout()
The time in seconds before a connection can be considered abandoned. |
int |
getSocketTimeout()
Returns the socket timeout in milliseconds |
int |
getSuspectTimeout()
Returns the time in seconds to pass before a connection is marked an abanoned suspect. |
int |
getTimeBetweenEvictionRunsMillis()
The number of milliseconds to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing. |
String |
getUrl()
Returns the Cassandra connection URL |
boolean |
getUseLock()
Return true if a lock should be used when operations are performed on the connection object. |
String |
getUsername()
Returns the username used to establish the connection with |
long |
getValidationInterval()
avoid excess validation, only run validation at most at this frequency - time in milliseconds. |
boolean |
isAutomaticHostDiscovery()
Returns whether automatic host discovery is being used |
boolean |
isFairQueue()
Returns true if a fair queue is being used by the connection pool |
boolean |
isFramed()
Returns whether framed connection mode is being used |
boolean |
isJmxEnabled()
If set to true, the connection pool creates a ConnectionPoolMBean object
that can be registered with JMX to receive notifications and state about the pool. |
boolean |
isLogAbandoned()
boolean flag to set if stack traces should be logged for application code which abandoned a Connection. |
boolean |
isPoolSweeperEnabled()
Returns true if the pool sweeper is enabled for the connection pool. |
boolean |
isRemoveAbandoned()
boolean flag to remove abandoned connections if they exceed the removeAbandonedTimout. |
boolean |
isTestOnBorrow()
The indication of whether objects will be validated before being borrowed from the pool. |
boolean |
isTestOnConnect()
Returns true if we should run the validation query when connecting to the database for the first time on a connection. |
boolean |
isTestOnReturn()
The indication of whether objects will be validated after being returned to the pool. |
boolean |
isTestWhileIdle()
Set to true if query validation should take place while the connection is idle. |
boolean |
isUseEquals()
Set to true if you wish the ProxyConnection class to use String.equals instead of
== when comparing method names. |
void |
postDeregister()
Unregisters the underlying connection pool mbean. |
void |
postRegister(Boolean registrationDone)
no-op |
void |
preDeregister()
no-op |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
If the connection pool MBean exists, it will be registered during this operation. |
protected void |
registerJmx()
Registers the ConnectionPoolMBean under a unique name based on the ObjectName for the DataSource |
void |
set(String name,
Object value)
Properties |
void |
setAbandonWhenPercentageFull(int percentage)
Connections that have been abandoned (timed out) wont get closed and reported up unless the number of connections in use are above the percentage defined by abandonWhenPercentageFull. |
void |
setAutomaticHostDiscovery(boolean autoDiscovery)
Sets whether Cassandra hosts should be queried to automatically obtain a list of other hosts |
void |
setDataSource(Object ds)
Injects a datasource that will be used to retrieve/create connections. |
void |
setDataSourceJNDI(String jndiDS)
Configure the connection pool to use a DataSource according to PoolConfiguration.setDataSource(Object)
But instead of injecting the object, specify the JNDI location. |
void |
setFailoverPolicy(HostFailoverPolicy failoverPolicy)
Sets the host failover policy, i.e. what to do when connecting to a host fails |
void |
setFairQueue(boolean fairQueue)
Set to true if you wish that calls to getConnection should be treated fairly in a true FIFO fashion. |
void |
setFramed(boolean framed)
Sets whether to use framed connection mode (default false) |
void |
setHost(String host)
Sets the Cassandra host. |
void |
setHostRetryInterval(long hostRetryInterval)
Sets the interval in milliseconds before retrying a host to which a connection has failed in the past. |
void |
setInitialSize(int initialSize)
Set the number of connections that will be established when the connection pool is started. |
void |
setJmxEnabled(boolean jmxEnabled)
If set to true, the connection pool creates a ConnectionPoolMBean object
that can be registered with JMX to receive notifications and state about the pool. |
void |
setKeySpace(String keySpace)
Sets the keyspace |
void |
setLogAbandoned(boolean logAbandoned)
boolean flag to set if stack traces should be logged for application code which abandoned a Connection. |
void |
setMaxActive(int maxActive)
The maximum number of active connections that can be allocated from this pool at the same time. |
void |
setMaxAge(long maxAge)
Time in milliseconds to keep this connection alive even when used. |
void |
setMaxIdle(int maxIdle)
The maximum number of connections that should be kept in the idle pool if PoolConfiguration.isPoolSweeperEnabled() returns false. |
void |
setMaxWait(int maxWait)
The maximum number of milliseconds that the pool will wait (when there are no available connections and the PoolConfiguration.getMaxActive() has been reached) for a connection to be returned
before throwing an exception. |
void |
setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis)
The minimum amount of time an object must sit idle in the pool before it is eligible for eviction. |
void |
setMinIdle(int minIdle)
The minimum number of established connections that should be kept in the pool at all times. |
void |
setName(String name)
Sets the name of the connection pool |
void |
setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Property not used |
void |
setPassword(String password)
Sets the password to establish the connection with. |
void |
setPort(int port)
Sets the Cassandra port |
void |
setRemoveAbandoned(boolean removeAbandoned)
boolean flag to remove abandoned connections if they exceed the removeAbandonedTimout. |
void |
setRemoveAbandonedTimeout(int removeAbandonedTimeout)
The time in seconds before a connection can be considered abandoned. |
void |
setSocketTimeout(int socketTimeout)
Sets the socket timeout in milliseconds |
void |
setSuspectTimeout(int seconds)
Similar to PoolConfiguration.setRemoveAbandonedTimeout(int) but instead of treating the connection
as abandoned, and potentially closing the connection, this simply logs the warning if
PoolConfiguration.isLogAbandoned() returns true. |
void |
setTestOnBorrow(boolean testOnBorrow)
The indication of whether objects will be validated before being borrowed from the pool. |
void |
setTestOnConnect(boolean testOnConnect)
Set to true if we should run the validation query when connecting to the database for the first time on a connection. |
void |
setTestOnReturn(boolean testOnReturn)
The indication of whether objects will be validated after being returned to the pool. |
void |
setTestWhileIdle(boolean testWhileIdle)
Set to true if query validation should take place while the connection is idle. |
void |
setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
The number of milliseconds to sleep between runs of the idle connection validation, abandoned cleaner and idle pool resizing. |
void |
setUrl(String url)
Sets the Cassandra connection URL. |
void |
setUseEquals(boolean useEquals)
Set to true if you wish the ProxyConnection class to use String.equals instead of
== when comparing method names. |
void |
setUseLock(boolean useLock)
Set to true if a lock should be used when operations are performed on the connection object. |
void |
setUsername(String username)
Sets the username used to establish the connection with |
void |
setValidationInterval(long validationInterval)
avoid excess validation, only run validation at most at this frequency - time in milliseconds. |
protected void |
unregisterJmx()
|
| Methods inherited from class net.dataforte.cassandra.pool.DataSourceProxy |
|---|
close, close, createPool, getConnection, getPool, getPoolProperties, getPoolSize, releaseConnection, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.dataforte.cassandra.thrift.CassandraThriftDataSource |
|---|
getConnection, releaseConnection |
| Field Detail |
|---|
protected volatile ObjectName oname
| Constructor Detail |
|---|
public DataSource()
public DataSource(PoolConfiguration poolProperties)
poolProperties - | Method Detail |
|---|
public void postDeregister()
postDeregister in interface MBeanRegistrationpublic void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistration
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationException
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
preRegister in interface MBeanRegistrationException
public ObjectName createObjectName(ObjectName original)
throws MalformedObjectNameException
original - the ObjectName for the DataSource
MalformedObjectNameExceptionprotected void registerJmx()
protected void unregisterJmx()
public void set(String name,
Object value)
set in interface PoolConfigurationname - the name of the propertyvalue - the new value of the propertypublic Object get(String name)
PoolConfiguration
get in interface PoolConfigurationname - the name of the property
public void setHost(String host)
PoolConfiguration
setHost in interface PoolConfigurationpublic String getHost()
PoolConfiguration
getHost in interface PoolConfigurationpublic void setPort(int port)
PoolConfiguration
setPort in interface PoolConfigurationpublic int getPort()
PoolConfiguration
getPort in interface PoolConfigurationpublic void setUrl(String url)
PoolConfiguration
setUrl in interface PoolConfigurationpublic String getUrl()
PoolConfiguration
getUrl in interface PoolConfigurationpublic void setFramed(boolean framed)
PoolConfiguration
setFramed in interface PoolConfigurationpublic boolean isFramed()
PoolConfiguration
isFramed in interface PoolConfigurationpublic void setAutomaticHostDiscovery(boolean autoDiscovery)
PoolConfiguration
setAutomaticHostDiscovery in interface PoolConfigurationpublic boolean isAutomaticHostDiscovery()
PoolConfiguration
isAutomaticHostDiscovery in interface PoolConfigurationpublic void setFailoverPolicy(HostFailoverPolicy failoverPolicy)
PoolConfiguration
setFailoverPolicy in interface PoolConfigurationpublic HostFailoverPolicy getFailoverPolicy()
PoolConfiguration
getFailoverPolicy in interface PoolConfigurationpublic void setAbandonWhenPercentageFull(int percentage)
PoolConfiguration
setAbandonWhenPercentageFull in interface PoolConfigurationpercentage - a value between 0 and 100 to indicate when connections that have been abandoned/timed out are considered abandonedpublic int getAbandonWhenPercentageFull()
PoolConfiguration
getAbandonWhenPercentageFull in interface PoolConfigurationpublic boolean isFairQueue()
PoolConfiguration
isFairQueue in interface PoolConfigurationpublic void setFairQueue(boolean fairQueue)
PoolConfigurationFairBlockingQueue implementation for the list of the idle connections.
The default value is true.
This flag is required when you want to use asynchronous connection retrieval.
setFairQueue in interface PoolConfigurationpublic int getInitialSize()
PoolConfiguration
getInitialSize in interface PoolConfigurationpublic void setInitialSize(int initialSize)
PoolConfigurationPoolConfiguration.setMaxActive(int) it will automatically be lowered.
setInitialSize in interface PoolConfigurationinitialSize - the number of connections to be established.public boolean isLogAbandoned()
PoolConfiguration
isLogAbandoned in interface PoolConfigurationpublic void setLogAbandoned(boolean logAbandoned)
PoolConfiguration
setLogAbandoned in interface PoolConfigurationlogAbandoned - set to true if stack traces should be recorded when DataSourceProxy.getConnection() is called.public int getMaxActive()
PoolConfiguration
getMaxActive in interface PoolConfigurationpublic void setMaxActive(int maxActive)
PoolConfiguration
setMaxActive in interface PoolConfigurationmaxActive - hard limit for number of managed connections by this poolpublic int getMaxIdle()
PoolConfigurationPoolConfiguration.isPoolSweeperEnabled() returns false.
If the If PoolConfiguration.isPoolSweeperEnabled() returns true, then the idle pool can grow up to PoolConfiguration.getMaxActive()
and will be shrunk according to PoolConfiguration.getMinEvictableIdleTimeMillis() setting.
Default value is maxActive:100
getMaxIdle in interface PoolConfigurationpublic void setMaxIdle(int maxIdle)
PoolConfigurationPoolConfiguration.isPoolSweeperEnabled() returns false.
If the If PoolConfiguration.isPoolSweeperEnabled() returns true, then the idle pool can grow up to PoolConfiguration.getMaxActive()
and will be shrunk according to PoolConfiguration.getMinEvictableIdleTimeMillis() setting.
Default value is maxActive:100
setMaxIdle in interface PoolConfigurationmaxIdle - the maximum size of the idle poolpublic int getMaxWait()
PoolConfigurationPoolConfiguration.getMaxActive() has been reached) for a connection to be returned
before throwing an exception. Default value is 30000 (30 seconds)
getMaxWait in interface PoolConfigurationpublic void setMaxWait(int maxWait)
PoolConfigurationPoolConfiguration.getMaxActive() has been reached) for a connection to be returned
before throwing an exception. Default value is 30000 (30 seconds)
setMaxWait in interface PoolConfigurationmaxWait - the maximum number of milliseconds to wait.public int getMinEvictableIdleTimeMillis()
PoolConfiguration
getMinEvictableIdleTimeMillis in interface PoolConfigurationpublic void setMinEvictableIdleTimeMillis(int minEvictableIdleTimeMillis)
PoolConfiguration
setMinEvictableIdleTimeMillis in interface PoolConfigurationminEvictableIdleTimeMillis - the number of milliseconds a connection must be idle to be eligible for eviction.public int getMinIdle()
PoolConfigurationPoolConfiguration.getInitialSize() (also see PoolConfiguration.setTestWhileIdle(boolean)
The idle pool will not shrink below this value during an eviction run, hence the number of actual connections
can be between PoolConfiguration.getMinIdle() and somewhere between PoolConfiguration.getMaxIdle() and PoolConfiguration.getMaxActive()
getMinIdle in interface PoolConfigurationpublic void setMinIdle(int minIdle)
PoolConfigurationPoolConfiguration.getInitialSize() (also see PoolConfiguration.setTestWhileIdle(boolean)
The idle pool will not shrink below this value during an eviction run, hence the number of actual connections
can be between PoolConfiguration.getMinIdle() and somewhere between PoolConfiguration.getMaxIdle() and PoolConfiguration.getMaxActive()
setMinIdle in interface PoolConfigurationminIdle - the minimum number of idle or established connectionspublic String getName()
PoolConfiguration
getName in interface PoolConfigurationpublic void setName(String name)
PoolConfiguration
setName in interface PoolConfigurationname - the name of the pool, should be unique in a runtime JVMpublic int getNumTestsPerEvictionRun()
PoolConfiguration
getNumTestsPerEvictionRun in interface PoolConfigurationpublic void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
PoolConfiguration
setNumTestsPerEvictionRun in interface PoolConfigurationnumTestsPerEvictionRun - parameter ignored.public String getPassword()
PoolConfiguration
getPassword in interface PoolConfigurationpublic void setPassword(String password)
PoolConfiguration
setPassword in interface PoolConfigurationpublic String getPoolName()
getPoolName in interface PoolConfigurationPoolConfiguration.getName()public String getKeySpace()
PoolConfiguration
getKeySpace in interface PoolConfigurationpublic void setKeySpace(String keySpace)
PoolConfiguration
setKeySpace in interface PoolConfigurationpublic String getUsername()
PoolConfiguration
getUsername in interface PoolConfigurationpublic void setUsername(String username)
PoolConfiguration
setUsername in interface PoolConfigurationpublic boolean isRemoveAbandoned()
PoolConfigurationPoolConfiguration.getRemoveAbandonedTimeout() and the condition for
PoolConfiguration.getAbandonWhenPercentageFull() is met.
Setting this to true can recover db connections from applications that fail to close a connection.
See also PoolConfiguration.isLogAbandoned() The default value is false.
isRemoveAbandoned in interface PoolConfigurationpublic void setRemoveAbandoned(boolean removeAbandoned)
PoolConfigurationPoolConfiguration.getRemoveAbandonedTimeout() and the condition for
PoolConfiguration.getAbandonWhenPercentageFull() is met.
Setting this to true can recover db connections from applications that fail to close a connection.
See also PoolConfiguration.isLogAbandoned() The default value is false.
setRemoveAbandoned in interface PoolConfigurationremoveAbandoned - set to true if abandoned connections can be closed and expelled out of the poolpublic void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
PoolConfiguration
setRemoveAbandonedTimeout in interface PoolConfigurationremoveAbandonedTimeout - the time in seconds before a used connection can be considered abandoned *public int getRemoveAbandonedTimeout()
PoolConfiguration
getRemoveAbandonedTimeout in interface PoolConfigurationpublic boolean isTestOnBorrow()
PoolConfigurationPoolConfiguration.setValidationInterval(long)
isTestOnBorrow in interface PoolConfigurationPoolConfiguration.getValidationInterval()public void setTestOnBorrow(boolean testOnBorrow)
PoolConfigurationPoolConfiguration.setValidationInterval(long)
setTestOnBorrow in interface PoolConfigurationtestOnBorrow - set to true if validation should take place before a connection is handed out to the applicationPoolConfiguration.getValidationInterval()public boolean isTestOnReturn()
PoolConfigurationPoolConfiguration.setValidationInterval(long)
isTestOnReturn in interface PoolConfigurationPoolConfiguration.getValidationInterval()public void setTestOnReturn(boolean testOnReturn)
PoolConfigurationPoolConfiguration.setValidationInterval(long)
setTestOnReturn in interface PoolConfigurationtestOnReturn - true if validation should take place after a connection is returned to the poolPoolConfiguration.getValidationInterval()public boolean isTestWhileIdle()
PoolConfiguration
isTestWhileIdle in interface PoolConfigurationPoolConfiguration.setTimeBetweenEvictionRunsMillis(int)public void setTestWhileIdle(boolean testWhileIdle)
PoolConfiguration
setTestWhileIdle in interface PoolConfigurationtestWhileIdle - true if validation should take place during idle checksPoolConfiguration.setTimeBetweenEvictionRunsMillis(int)public int getTimeBetweenEvictionRunsMillis()
PoolConfiguration
getTimeBetweenEvictionRunsMillis in interface PoolConfigurationpublic void setTimeBetweenEvictionRunsMillis(int timeBetweenEvictionRunsMillis)
PoolConfiguration
setTimeBetweenEvictionRunsMillis in interface PoolConfigurationtimeBetweenEvictionRunsMillis - the sleep time in between validations in millisecondspublic long getValidationInterval()
PoolConfiguration
getValidationInterval in interface PoolConfigurationpublic void setValidationInterval(long validationInterval)
PoolConfiguration
setValidationInterval in interface PoolConfigurationvalidationInterval - the validation interval in millisecondspublic boolean isTestOnConnect()
PoolConfiguration
isTestOnConnect in interface PoolConfigurationpublic void setTestOnConnect(boolean testOnConnect)
PoolConfiguration
setTestOnConnect in interface PoolConfigurationtestOnConnect - set to true if we should run the validation query upon connectpublic boolean isJmxEnabled()
PoolConfigurationConnectionPoolMBean object
that can be registered with JMX to receive notifications and state about the pool.
The ConnectionPool object doesn't register itself, as there is no way to keep a static non changing ObjectName across JVM restarts.
isJmxEnabled in interface PoolConfigurationpublic void setJmxEnabled(boolean jmxEnabled)
PoolConfigurationConnectionPoolMBean object
that can be registered with JMX to receive notifications and state about the pool.
The ConnectionPool object doesn't register itself, as there is no way to keep a static non changing ObjectName across JVM restarts.
setJmxEnabled in interface PoolConfigurationjmxEnabled - set to to if the mbean object should be created upon startup.public boolean isPoolSweeperEnabled()
PoolConfiguration
isPoolSweeperEnabled in interface PoolConfigurationpublic boolean isUseEquals()
PoolConfigurationProxyConnection class to use String.equals instead of
== when comparing method names.
This property does not apply to added interceptors as those are configured individually.
The default value is false.
isUseEquals in interface PoolConfigurationString.equals(Object) instead of == when comparing method names on Connection methodspublic void setUseEquals(boolean useEquals)
PoolConfigurationProxyConnection class to use String.equals instead of
== when comparing method names.
This property does not apply to added interceptors as those are configured individually.
The default value is false.
setUseEquals in interface PoolConfigurationuseEquals - set to true if the pool should use String.equals(Object) instead of ==
when comparing method names on Connection methodspublic long getMaxAge()
PoolConfiguration
getMaxAge in interface PoolConfigurationpublic void setMaxAge(long maxAge)
PoolConfiguration
setMaxAge in interface PoolConfigurationmaxAge - the time in milliseconds a connection will be open for when usedpublic boolean getUseLock()
PoolConfiguration
getUseLock in interface PoolConfigurationpublic void setUseLock(boolean useLock)
PoolConfiguration
setUseLock in interface PoolConfigurationuseLock - set to true if a lock should be used on connection operationspublic void setSuspectTimeout(int seconds)
PoolConfigurationPoolConfiguration.setRemoveAbandonedTimeout(int) but instead of treating the connection
as abandoned, and potentially closing the connection, this simply logs the warning if
PoolConfiguration.isLogAbandoned() returns true. If this value is equal or less than 0, no suspect
checking will be performed. Suspect checking only takes place if the timeout value is larger than 0 and
the connection was not abandoned or if abandon check is disabled. If a connection is suspect a WARN message gets
logged and a JMX notification gets sent once.
setSuspectTimeout in interface PoolConfigurationseconds - - the amount of time in seconds that has to pass before a connection is marked suspect.public int getSuspectTimeout()
PoolConfiguration
getSuspectTimeout in interface PoolConfigurationpublic int getSocketTimeout()
PoolConfiguration
getSocketTimeout in interface PoolConfigurationpublic void setSocketTimeout(int socketTimeout)
PoolConfiguration
setSocketTimeout in interface PoolConfigurationpublic String[] getConfiguredHosts()
PoolConfiguration
getConfiguredHosts in interface PoolConfigurationpublic long getHostRetryInterval()
PoolConfiguration
getHostRetryInterval in interface PoolConfigurationpublic void setHostRetryInterval(long hostRetryInterval)
PoolConfiguration
setHostRetryInterval in interface PoolConfigurationhostRetryInterval - number of millieseconds before retrying a hostpublic void setDataSourceJNDI(String jndiDS)
PoolConfigurationPoolConfiguration.setDataSource(Object)
But instead of injecting the object, specify the JNDI location.
After a successful JNDI look, the PoolConfiguration.getDataSource() will not return null.
setDataSourceJNDI in interface PoolConfigurationjndiDS - -the JNDI string @TODO specify the rules here.public String getDataSourceJNDI()
PoolConfiguration
getDataSourceJNDI in interface PoolConfigurationpublic void setDataSource(Object ds)
PoolConfiguration
setDataSource in interface PoolConfigurationds - the DataSource to be used for creating connections to be pooled.public Object getDataSource()
PoolConfiguration
getDataSource in interface PoolConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||