Package liquibase.lockservice
Class StandardLockService
java.lang.Object
liquibase.lockservice.StandardLockService
- All Implemented Interfaces:
LockService
,PrioritizedService
- Direct Known Subclasses:
LockServiceImpl
-
Field Summary
Modifier and TypeFieldDescriptionprotected Long
protected Long
protected static final ResourceBundle
protected Database
protected boolean
protected Boolean
protected boolean
protected ObjectQuotingStrategy
protected final SecureRandom
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
destroy()
void
Releases whatever locks are on the database change log tableprotected Long
protected Long
int
boolean
void
init()
protected boolean
protected boolean
isDatabaseChangeLogLockTableCreated
(boolean forceRecheck) Check whether the databasechangeloglock table exists in the database.boolean
isDatabaseChangeLogLockTableInitialized
(boolean tableJustCreated) protected boolean
isDatabaseChangeLogLockTableInitialized
(boolean tableJustCreated, boolean forceRecheck) Determine whether the databasechangeloglock table has been initialized.void
void
reset()
Clears information the lock handler knows about the tables.void
setChangeLogLockRecheckTime
(long changeLogLockRecheckTime) void
setChangeLogLockWaitTime
(long changeLogLockWaitTime) void
setDatabase
(Database database) boolean
void
-
Field Details
-
coreBundle
-
database
-
hasChangeLogLock
protected boolean hasChangeLogLock -
changeLogLockPollRate
-
changeLogLockRecheckTime
-
hasDatabaseChangeLogLockTable
-
isDatabaseChangeLogLockTableInitialized
protected boolean isDatabaseChangeLogLockTableInitialized -
quotingStrategy
-
random
-
-
Constructor Details
-
StandardLockService
public StandardLockService()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriority
in interfacePrioritizedService
-
supports
- Specified by:
supports
in interfaceLockService
-
setDatabase
- Specified by:
setDatabase
in interfaceLockService
-
getChangeLogLockWaitTime
-
setChangeLogLockWaitTime
public void setChangeLogLockWaitTime(long changeLogLockWaitTime) - Specified by:
setChangeLogLockWaitTime
in interfaceLockService
-
getChangeLogLockRecheckTime
-
setChangeLogLockRecheckTime
public void setChangeLogLockRecheckTime(long changeLogLockRecheckTime) - Specified by:
setChangeLogLockRecheckTime
in interfaceLockService
-
init
- Specified by:
init
in interfaceLockService
- Throws:
DatabaseException
-
isDatabaseChangeLogLockTableInitialized
public boolean isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated) -
isDatabaseChangeLogLockTableInitialized
protected boolean isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated, boolean forceRecheck) Determine whether the databasechangeloglock table has been initialized.- Parameters:
forceRecheck
- if true, do not use any cached information, and recheck the actual database
-
hasChangeLogLock
public boolean hasChangeLogLock()- Specified by:
hasChangeLogLock
in interfaceLockService
-
isDatabaseChangeLogLockTableCreated
protected boolean isDatabaseChangeLogLockTableCreated(boolean forceRecheck) Check whether the databasechangeloglock table exists in the database.- Parameters:
forceRecheck
- if true, do not use any cached information and check the actual database
-
isDatabaseChangeLogLockTableCreated
- Throws:
DatabaseException
-
waitForLock
- Specified by:
waitForLock
in interfaceLockService
- Throws:
LockException
-
acquireLock
- Specified by:
acquireLock
in interfaceLockService
- Throws:
LockException
-
releaseLock
- Specified by:
releaseLock
in interfaceLockService
- Throws:
LockException
-
listLocks
- Specified by:
listLocks
in interfaceLockService
- Throws:
LockException
-
forceReleaseLock
Description copied from interface:LockService
Releases whatever locks are on the database change log table- Specified by:
forceReleaseLock
in interfaceLockService
- Throws:
LockException
DatabaseException
-
reset
public void reset()Description copied from interface:LockService
Clears information the lock handler knows about the tables. Should only be called by Liquibase internal calls- Specified by:
reset
in interfaceLockService
-
destroy
- Specified by:
destroy
in interfaceLockService
- Throws:
DatabaseException
-