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
EtlConnectionFactory
addConnection
in interface EtlConnectionFactory
Exception
public Connection getConnection(ConnectionParams params, boolean isNew) throws Exception
EtlConnectionFactory
getConnection
in interface EtlConnectionFactory
params
- the ConnectionParamsisNew
- boolena, if true always create new connectionException
- in case of any errorpublic Connection getConnection(ConnectionParams params) throws Exception
ConnectionFactory
getConnection
in interface ConnectionFactory
params
- the ConnectionParamsException
- in case of any errorpublic Connection getConnection(String name)
ConnectionFactory
getConnection
in interface ConnectionFactory
name
- the namepublic Connection getConnection(String name, boolean isNew) throws Exception
EtlConnectionFactory
getConnection
in interface EtlConnectionFactory
name
- the connection nameisNew
- boolean, if true creates new connectionException
- in case of any errorpublic ConnectionParams getConnectionParams(Connection conn)
EtlConnectionFactory
getConnectionParams
in interface EtlConnectionFactory
conn
- the connectionpublic ConnectionParams getConnectionParams(String name)
EtlConnectionFactory
getConnectionParams
in interface EtlConnectionFactory
name
- the namepublic boolean isReadyToCommit(Connection con)
ConnectionFactory
isReadyToCommit
in interface ConnectionFactory
con
- the connectionpublic void releaseConnection(Connection con)
ConnectionFactory
releaseConnection
in interface ConnectionFactory
con
- the connectionpublic void releaseConnections()
EtlConnectionFactory
releaseConnections
in interface EtlConnectionFactory
Copyright © 2010-2020 Toolsverse. All Rights Reserved.