Package liquibase.lockservice
Class MockLockService
- java.lang.Object
-
- liquibase.lockservice.MockLockService
-
- All Implemented Interfaces:
LockService,PrioritizedService
public class MockLockService extends Object implements LockService
-
-
Field Summary
-
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description MockLockService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacquireLock()voiddestroy()voidforceReleaseLock()Releases whatever locks are on the database change log tableintgetPriority()booleanhasChangeLogLock()voidinit()DatabaseChangeLogLock[]listLocks()voidreleaseLock()voidreset()Clears information the lock handler knows about the tables.voidsetChangeLogLockRecheckTime(long changeLogLockRecheckTime)voidsetChangeLogLockWaitTime(long changeLogLockWaitTime)voidsetDatabase(Database database)booleansupports(Database database)voidwaitForLock()
-
-
-
Method Detail
-
supports
public boolean supports(Database database)
- Specified by:
supportsin interfaceLockService
-
init
public void init() throws DatabaseException- Specified by:
initin interfaceLockService- Throws:
DatabaseException
-
setDatabase
public void setDatabase(Database database)
- Specified by:
setDatabasein interfaceLockService
-
setChangeLogLockWaitTime
public void setChangeLogLockWaitTime(long changeLogLockWaitTime)
- Specified by:
setChangeLogLockWaitTimein interfaceLockService
-
setChangeLogLockRecheckTime
public void setChangeLogLockRecheckTime(long changeLogLockRecheckTime)
- Specified by:
setChangeLogLockRecheckTimein interfaceLockService
-
hasChangeLogLock
public boolean hasChangeLogLock()
- Specified by:
hasChangeLogLockin interfaceLockService
-
waitForLock
public void waitForLock() throws LockException- Specified by:
waitForLockin interfaceLockService- Throws:
LockException
-
acquireLock
public boolean acquireLock() throws LockException- Specified by:
acquireLockin interfaceLockService- Throws:
LockException
-
releaseLock
public void releaseLock() throws LockException- Specified by:
releaseLockin interfaceLockService- Throws:
LockException
-
listLocks
public DatabaseChangeLogLock[] listLocks() throws LockException
- Specified by:
listLocksin interfaceLockService- Throws:
LockException
-
forceReleaseLock
public void forceReleaseLock() throws LockException, DatabaseExceptionDescription copied from interface:LockServiceReleases whatever locks are on the database change log table- Specified by:
forceReleaseLockin interfaceLockService- Throws:
LockExceptionDatabaseException
-
reset
public void reset()
Description copied from interface:LockServiceClears information the lock handler knows about the tables. Should only be called by Liquibase internal calls- Specified by:
resetin interfaceLockService
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfacePrioritizedService
-
destroy
public void destroy() throws DatabaseException- Specified by:
destroyin interfaceLockService- Throws:
DatabaseException
-
-