Class CacheTransactionSync
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.impl.CacheTransactionSync
-
- All Implemented Interfaces:
Synchronization
public class CacheTransactionSync extends Object implements Synchronization
Adapter to synchronize the thread-local caches with the shared caches when the transaction commits. It's important that we don't share ids created inside a transaction with other threads until the data is committed - those ids are not visible to other threads/transactions (the 'I' in ACID).
-
-
Constructor Summary
Constructors Constructor Description CacheTransactionSync(TransactionSynchronizationRegistry txSyncRegistry, FHIRPersistenceJDBCCache cache, String transactionDataKey)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCompletion(int status)
void
beforeCompletion()
-
-
-
Constructor Detail
-
CacheTransactionSync
public CacheTransactionSync(TransactionSynchronizationRegistry txSyncRegistry, FHIRPersistenceJDBCCache cache, String transactionDataKey)
Public constructor- Parameters:
cacheImpl
-
-
-
Method Detail
-
beforeCompletion
public void beforeCompletion()
- Specified by:
beforeCompletion
in interfaceSynchronization
-
afterCompletion
public void afterCompletion(int status)
- Specified by:
afterCompletion
in interfaceSynchronization
-
-