public class EtlConnectionFactoryImpl extends Object implements EtlConnectionFactory
| Constructor and Description |
|---|
EtlConnectionFactoryImpl()
Instantiates a new etl connection factory.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
addConnection(Connection con,
ConnectionParams params,
String name,
String defName)
Creates a new connection if needed and adds it to the map of named
connections.
|
Connection |
getConnection(ConnectionParams params)
Gets the connection by ConnectionParams.
|
Connection |
getConnection(ConnectionParams params,
boolean isNew)
Create and return new connection using given ConnectionParams.
|
Connection |
getConnection(String name)
Gets the connection by name.
|
Connection |
getConnection(String name,
boolean isNew)
Creates and returns a new connection by name.
|
ConnectionParams |
getConnectionParams(Connection conn)
Gets the connection params for the given connection.
|
ConnectionParams |
getConnectionParams(String name)
Gets the connection params by the given name.
|
boolean |
isReadyToCommit(Connection con)
Checks if connection is ready to commit.
|
void |
releaseConnection(Connection con)
Releases connection.
|
void |
releaseConnections()
Releases all connections.
|
public EtlConnectionFactoryImpl()
public Connection addConnection(Connection con,
ConnectionParams params,
String name,
String defName)
throws Exception
EtlConnectionFactoryaddConnection in interface EtlConnectionFactoryExceptionpublic Connection getConnection(ConnectionParams params, boolean isNew) throws Exception
EtlConnectionFactorygetConnection in interface EtlConnectionFactoryparams - the ConnectionParamsisNew - boolena, if true always create new connectionException - in case of any errorpublic Connection getConnection(ConnectionParams params) throws Exception
ConnectionFactorygetConnection in interface ConnectionFactoryparams - the ConnectionParamsException - in case of any errorpublic Connection getConnection(String name)
ConnectionFactorygetConnection in interface ConnectionFactoryname - the namepublic Connection getConnection(String name,
boolean isNew)
throws Exception
EtlConnectionFactorygetConnection in interface EtlConnectionFactoryname - the connection nameisNew - boolean, if true creates new connectionException - in case of any errorpublic ConnectionParams getConnectionParams(Connection conn)
EtlConnectionFactorygetConnectionParams in interface EtlConnectionFactoryconn - the connectionpublic ConnectionParams getConnectionParams(String name)
EtlConnectionFactorygetConnectionParams in interface EtlConnectionFactoryname - the namepublic boolean isReadyToCommit(Connection con)
ConnectionFactoryisReadyToCommit in interface ConnectionFactorycon - the connectionpublic void releaseConnection(Connection con)
ConnectionFactoryreleaseConnection in interface ConnectionFactorycon - the connectionpublic void releaseConnections()
EtlConnectionFactoryreleaseConnections in interface EtlConnectionFactoryCopyright © 2010-2020 Toolsverse. All Rights Reserved.