Z
- data source classpublic abstract class CommonDataSource<Z extends CommonDataSource,D extends Database<Z>,F extends CommonDataSourceProxyFactory<Z,D>> extends Object implements Referenceable, CommonDataSource, CommonDataSourceProxyFactoryFactory<Z,D,F>, Registry.Factory<Void,DatabaseCluster<Z,D>,Void,SQLException>
Modifier | Constructor and Description |
---|---|
protected |
CommonDataSource(Class<? extends DatabaseClusterConfiguration<Z,D>> configurationClass) |
Modifier and Type | Method and Description |
---|---|
DatabaseCluster<Z,D> |
create(Void key,
Void context) |
String |
getCluster() |
String |
getConfig() |
DatabaseClusterConfigurationFactory<Z,D> |
getConfigurationFactory() |
DatabaseClusterFactory<Z,D> |
getFactory() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
String |
getPassword() |
Z |
getProxy() |
Reference |
getReference() |
TimePeriod |
getTimeout() |
String |
getUser() |
void |
setCluster(String cluster) |
void |
setConfig(String config) |
void |
setConfigurationFactory(DatabaseClusterConfigurationFactory<Z,D> configurationFactory) |
void |
setFactory(DatabaseClusterFactory<Z,D> clusterFactory) |
void |
setLoginTimeout(int timeout) |
void |
setLogWriter(PrintWriter writer) |
void |
setPassword(String password) |
void |
setTimeout(long value,
TimeUnit unit) |
void |
setUser(String user) |
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createProxyFactory
protected CommonDataSource(Class<? extends DatabaseClusterConfiguration<Z,D>> configurationClass)
public void stop() throws SQLException
SQLException
public DatabaseCluster<Z,D> create(Void key, Void context) throws SQLException
create
in interface Registry.Factory<Void,DatabaseCluster<Z extends CommonDataSource,D extends Database<Z>>,Void,SQLException>
SQLException
public Z getProxy() throws SQLException
SQLException
public String getCluster()
public void setCluster(String cluster)
cluster
- the cluster to setpublic String getPassword()
public void setPassword(String password)
public DatabaseClusterConfigurationFactory<Z,D> getConfigurationFactory()
public void setConfigurationFactory(DatabaseClusterConfigurationFactory<Z,D> configurationFactory)
public DatabaseClusterFactory<Z,D> getFactory()
public void setFactory(DatabaseClusterFactory<Z,D> clusterFactory)
public TimePeriod getTimeout()
getTimeout
in interface Registry.Factory<Void,DatabaseCluster<Z extends CommonDataSource,D extends Database<Z>>,Void,SQLException>
public void setTimeout(long value, TimeUnit unit)
value
- the timeout to set, expressed in the specified unitsunit
- the time unit with which to qualify the specified timeout valuepublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
CommonDataSource.getParentLogger()
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
CommonDataSource.getLoginTimeout()
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
CommonDataSource.getLogWriter()
public void setLoginTimeout(int timeout) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
CommonDataSource.setLoginTimeout(int)
public void setLogWriter(PrintWriter writer) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
CommonDataSource.setLogWriter(java.io.PrintWriter)
public Reference getReference()
getReference
in interface Referenceable
Copyright © 2004–2014 Paul Ferraro. All rights reserved.