Package org.pentaho.di.core.database.map
Class DatabaseConnectionMap
java.lang.Object
org.pentaho.di.core.database.map.DatabaseConnectionMap
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
Modifier and TypeMethodDescriptionvoidaddTransactionListener(String transactionId, DatabaseTransactionListener listener) static StringcreateEntryKey(String connectionGroup, String partitionID, Database database) getDatabase(String connectionGroup, String partitionID, Database database) Deprecated.use getOrStoreIfAbsent(String, String, Database) insteadstatic DatabaseConnectionMapgetMap()getOrStoreIfAbsent(String connectionGroup, String partitionID, Database database) Tries to obtain an existing Database instance for specified parameters.getTransactionListeners(String transactionId) voidremoveConnection(String connectionGroup, String partitionID, Database database) voidremoveTransactionListener(String transactionId, DatabaseTransactionListener listener) voidremoveTransactionListeners(String transactionId) voidstoreDatabase(String connectionGroup, String partitionID, Database database) Deprecated.use getOrStoreIfAbsent(String, String, Database) instead
-
Method Details
-
getInstance
-
getOrStoreIfAbsent
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
-
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
-
getMap
-
getNextTransactionId
-
addTransactionListener
-
removeTransactionListener
-
getTransactionListeners
-
removeTransactionListeners
-