Package ca.uhn.fhir.jpa.interceptor
Class TransactionConcurrencySemaphoreInterceptor
java.lang.Object
ca.uhn.fhir.jpa.interceptor.TransactionConcurrencySemaphoreInterceptor
This interceptor uses semaphores to avoid multiple concurrent FHIR transaction
bundles from processing the same records at the same time, avoiding concurrency
issues.
-
Constructor Summary
ConstructorDescriptionTransactionConcurrencySemaphoreInterceptor
(MemoryCacheService theMemoryCacheService) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all semaphors from the list.long
Returns a count of all semaphores currently in the cache (incuding held and unheld semaphores)boolean
Should the interceptor log if a wait for a semaphore is requiredvoid
post
(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails) void
pre
(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, TransactionWriteOperationsDetails theWriteOperationsDetails) void
setLogWaits
(boolean theLogWaits) Should the interceptor log if a wait for a semaphore is required
-
Constructor Details
-
TransactionConcurrencySemaphoreInterceptor
Constructor
-
-
Method Details
-
isLogWaits
Should the interceptor log if a wait for a semaphore is required -
setLogWaits
Should the interceptor log if a wait for a semaphore is required -
pre
public void pre(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails, TransactionWriteOperationsDetails theWriteOperationsDetails) -
post
-
clearSemaphores
Clear all semaphors from the list. This is really mostly intended for testing scenarios. -
countSemaphores
Returns a count of all semaphores currently in the cache (incuding held and unheld semaphores)
-