Package org.pentaho.di.core.database.map
Class DatabaseConnectionMap
- java.lang.Object
-
- org.pentaho.di.core.database.map.DatabaseConnectionMap
-
public class DatabaseConnectionMap extends Object
This class contains a map between on the one hand the transformation name/thread the partition ID the connection group And on the other hand The database connection The number of times it was opened- Author:
- Matt
-
-
Method Summary
-
-
-
Method Detail
-
getInstance
public static DatabaseConnectionMap getInstance()
-
getOrStoreIfAbsent
public Database getOrStoreIfAbsent(String connectionGroup, String partitionID, Database database)
Tries to obtain an existing Database instance for specified parameters. If none is found, then maps the key's value to database. Similarly to ConcurrentHashMap.putIfAbsent(Object, Object) returns null if there was no value for the specified key and they mapped value otherwise.- Parameters:
connectionGroup
- connection grouppartitionID
- partition's iddatabase
- database- Returns:
- null or previous value
-
removeConnection
public void removeConnection(String connectionGroup, String partitionID, Database database)
-
storeDatabase
@Deprecated public void storeDatabase(String connectionGroup, String partitionID, Database database)
Deprecated.use getOrStoreIfAbsent(String, String, Database) instead
-
getDatabase
@Deprecated public Database getDatabase(String connectionGroup, String partitionID, Database database)
Deprecated.use getOrStoreIfAbsent(String, String, Database) instead
-
createEntryKey
public static String createEntryKey(String connectionGroup, String partitionID, Database database)
-
getNextTransactionId
public String getNextTransactionId()
-
addTransactionListener
public void addTransactionListener(String transactionId, DatabaseTransactionListener listener)
-
removeTransactionListener
public void removeTransactionListener(String transactionId, DatabaseTransactionListener listener)
-
getTransactionListeners
public List<DatabaseTransactionListener> getTransactionListeners(String transactionId)
-
removeTransactionListeners
public void removeTransactionListeners(String transactionId)
-
-