Class LiquibaseDBLockProvider
- java.lang.Object
- 
- org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider
 
- 
- All Implemented Interfaces:
- DBLockProvider,- Provider
 
 public class LiquibaseDBLockProvider extends Object implements DBLockProvider - Author:
- Marek Posolda
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.dblock.DBLockProviderDBLockProvider.Namespace
 
- 
 - 
Constructor SummaryConstructors Constructor Description LiquibaseDBLockProvider(LiquibaseDBLockProviderFactory factory, KeycloakSession session)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddestroyLockInfo()Will destroy whole state of DB lock (drop table/collection to track locking).DBLockProvider.NamespacegetCurrentLock()Returns the current provider namespace locked or nullvoidreleaseLock()Release previously acquired lock by this provider.booleansupportsForcedUnlock()voidwaitForLock(DBLockProvider.Namespace lock)Try to retrieve DB lock or wait if retrieve was unsuccessful.
 
- 
- 
- 
Constructor Detail- 
LiquibaseDBLockProviderpublic LiquibaseDBLockProvider(LiquibaseDBLockProviderFactory factory, KeycloakSession session) 
 
- 
 - 
Method Detail- 
waitForLockpublic void waitForLock(DBLockProvider.Namespace lock) Description copied from interface:DBLockProviderTry to retrieve DB lock or wait if retrieve was unsuccessful. Throw exception if lock can't be retrieved within specified timeout (900 seconds by default) Throw exception if a different namespace has already been locked by this provider.- Specified by:
- waitForLockin interface- DBLockProvider
- Parameters:
- lock- The namespace to lock
 
 - 
releaseLockpublic void releaseLock() Description copied from interface:DBLockProviderRelease previously acquired lock by this provider.- Specified by:
- releaseLockin interface- DBLockProvider
 
 - 
getCurrentLockpublic DBLockProvider.Namespace getCurrentLock() Description copied from interface:DBLockProviderReturns the current provider namespace locked or null- Specified by:
- getCurrentLockin interface- DBLockProvider
- Returns:
- The namespace locked or null if there is no lock
 
 - 
supportsForcedUnlockpublic boolean supportsForcedUnlock() - Specified by:
- supportsForcedUnlockin interface- DBLockProvider
- Returns:
- true if provider supports forced unlock at startup
 
 - 
destroyLockInfopublic void destroyLockInfo() Description copied from interface:DBLockProviderWill destroy whole state of DB lock (drop table/collection to track locking).- Specified by:
- destroyLockInfoin interface- DBLockProvider
 
 
- 
 
-