Class LiquibaseDBLockProviderFactory
- java.lang.Object
-
- org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProviderFactory
-
- All Implemented Interfaces:
DBLockProviderFactory,EnvironmentDependentProviderFactory,ProviderFactory<DBLockProvider>
public class LiquibaseDBLockProviderFactory extends Object implements DBLockProviderFactory, EnvironmentDependentProviderFactory
- Author:
- Marek Posolda
-
-
Field Summary
Fields Modifier and Type Field Description static intPROVIDER_PRIORITY
-
Constructor Summary
Constructors Constructor Description LiquibaseDBLockProviderFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This is called when the server shuts down.LiquibaseDBLockProvidercreate(KeycloakSession session)List<ProviderConfigProperty>getConfigMetadata()Returns the metadata for each configuration property supported by this factory.StringgetId()protected longgetLockWaitTimeoutMillis()voidinit(Config.Scope config)Only called once when the factory is first created.booleanisSupported()intorder()voidpostInit(KeycloakSessionFactory factory)Called after all provider factories have been initializedvoidsetTimeouts(long lockRecheckTimeMillis, long lockWaitTimeoutMillis)Useful for testing to override provided configuration-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.provider.EnvironmentDependentProviderFactory
isSupported
-
-
-
-
Field Detail
-
PROVIDER_PRIORITY
public static final int PROVIDER_PRIORITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLockWaitTimeoutMillis
protected long getLockWaitTimeoutMillis()
-
init
public void init(Config.Scope config)
Description copied from interface:ProviderFactoryOnly called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
initin interfaceProviderFactory<DBLockProvider>
-
postInit
public void postInit(KeycloakSessionFactory factory)
Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
postInitin interfaceProviderFactory<DBLockProvider>
-
create
public LiquibaseDBLockProvider create(KeycloakSession session)
- Specified by:
createin interfaceProviderFactory<DBLockProvider>
-
setTimeouts
public void setTimeouts(long lockRecheckTimeMillis, long lockWaitTimeoutMillis)Description copied from interface:DBLockProviderFactoryUseful for testing to override provided configuration- Specified by:
setTimeoutsin interfaceDBLockProviderFactory
-
close
public void close()
Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
closein interfaceProviderFactory<DBLockProvider>
-
getId
public String getId()
- Specified by:
getIdin interfaceProviderFactory<DBLockProvider>
-
order
public int order()
- Specified by:
orderin interfaceProviderFactory<DBLockProvider>
-
getConfigMetadata
public List<ProviderConfigProperty> getConfigMetadata()
Description copied from interface:ProviderFactoryReturns the metadata for each configuration property supported by this factory.- Specified by:
getConfigMetadatain interfaceProviderFactory<DBLockProvider>- Returns:
- a list with the metadata for each configuration property supported by this factory
-
isSupported
public boolean isSupported()
- Specified by:
isSupportedin interfaceEnvironmentDependentProviderFactory- Returns:
trueif the provider is supported and should be available,falseotherwise
-
-