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 Details

  • Method Details

    • isLogWaits

      public boolean isLogWaits()
      Should the interceptor log if a wait for a semaphore is required
    • setLogWaits

      public void setLogWaits(boolean theLogWaits)
      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

      public void post(ca.uhn.fhir.rest.api.server.storage.TransactionDetails theTransactionDetails)
    • clearSemaphores

      public void clearSemaphores()
      Clear all semaphors from the list. This is really mostly intended for testing scenarios.
    • countSemaphores

      public long countSemaphores()
      Returns a count of all semaphores currently in the cache (incuding held and unheld semaphores)