Wrapper, CommonDataSource, DataSourcepublic class MonetDataSource extends MonetWrapper implements DataSource
| Constructor | Description |
|---|---|
MonetDataSource() |
| Modifier and Type | Method | Description |
|---|---|---|
Connection |
getConnection() |
Attempts to establish a connection with the data source that this DataSource object represents.
|
Connection |
getConnection(String username,
String password) |
Attempts to establish a connection with the data source that this DataSource object represents.
|
String |
getDescription() |
Gets the description
|
String |
getDirectory() |
Gets the directory value
|
int |
getLoginTimeout() |
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
|
PrintWriter |
getLogWriter() |
Retrieves the log writer for this DataSource object.
|
Logger |
getParentLogger() |
Return the parent Logger of all the Loggers used by this data
source.
|
String |
getURL() |
Gets the connection URL
|
String |
getUser() |
Gets the username
|
boolean |
isEmbedded() |
Gets the embedded connection directory.
|
void |
setDescription(String description) |
Sets the description
|
void |
setDirectory(String directory) |
Sets the directory value, meaning it wil start an embedded connection
|
void |
setLoginTimeout(int seconds) |
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
|
void |
setLogWriter(PrintWriter out) |
Sets the log writer for this DataSource object to the given java.io.PrintWriter object.
|
void |
setPassword(String password) |
Sets the password to use when connecting.
|
void |
setURL(String url) |
Sets the connection URL
|
void |
setUser(String user) |
Sets the username
|
createShardingKeyBuildercreateConnectionBuilderisWrapperFor, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisWrapperFor, unwrappublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLException - if connecting to the database failspublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceusername - the username to usepassword - the password to useSQLException - if connecting to the database failspublic int getLoginTimeout()
getLoginTimeout in interface CommonDataSourcegetLoginTimeout in interface DataSourcepublic void setLoginTimeout(int seconds)
setLoginTimeout in interface CommonDataSourcesetLoginTimeout in interface DataSourceseconds - the number of seconds to wait before aborting the connectpublic PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcegetLogWriter in interface DataSourcepublic void setLogWriter(PrintWriter out)
setLogWriter in interface CommonDataSourcesetLogWriter in interface DataSourceout - a PrintWriter - ignoredpublic void setPassword(String password)
password - the passwordpublic String getUser()
public void setUser(String user)
user - the usernamepublic String getURL()
public void setURL(String url)
url - the connection URLpublic String getDescription()
public void setDescription(String description)
description - the descriptionpublic String getDirectory()
public void setDirectory(String directory)
directory - The directory locationpublic boolean isEmbedded()
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedException - if the data source does not use java.util.loggingCopyright © 2018. All rights reserved.