Class SearchParamIdentityCacheSvcImpl.PersistSearchParameterIdentityTask

java.lang.Object
ca.uhn.fhir.jpa.sp.SearchParamIdentityCacheSvcImpl.PersistSearchParameterIdentityTask
All Implemented Interfaces:
Callable<Void>
Enclosing class:
SearchParamIdentityCacheSvcImpl

This class is responsible for ensuring that a unique IndexedSearchParamIdentity exists for a given hash identity (parameter name and resource type). This task is executed asynchronously to avoid blocking the main thread during persistence.

This task checks the in-memory cache for the given hash identity and, if missing, attempts to create or retrieve the corresponding IndexedSearchParamIdentity from the database. The result is then added to the cache.

Up to 20 retries are permitted in case of a DataIntegrityViolationException, which can occur due to concurrent insert attempts for the same identity. If all retries fail, the IndexedSearchParamIdentity will not be saved during this execution, but the task may be retried later when submitted again.

See Also: