Package ca.uhn.fhir.jpa.migrate
Class HapiMigrationLock
java.lang.Object
ca.uhn.fhir.jpa.migrate.HapiMigrationLock
- All Implemented Interfaces:
AutoCloseable
The approach used in this class is borrowed from org.flywaydb.community.database.ignite.thin.IgniteThinDatabase
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionHapiMigrationLock(HapiMigrationStorageSvc theMigrationStorageSvc) This constructor should only ever be called from within a try-with-resources so the lock is released when the block is exited -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static voidsetMaxRetryAttempts(int theMaxRetryAttempts)
-
Field Details
-
SLEEP_MILLIS_BETWEEN_LOCK_RETRIES
- See Also:
-
DEFAULT_MAX_RETRY_ATTEMPTS
- See Also:
-
ourMaxRetryAttempts
-
CLEAR_LOCK_TABLE_WITH_DESCRIPTION
- See Also:
-
-
Constructor Details
-
HapiMigrationLock
This constructor should only ever be called from within a try-with-resources so the lock is released when the block is exited
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable
-
setMaxRetryAttempts
-