Package liquibase.nosql.lockservice
Class AbstractNoSqlLockService<D extends AbstractNoSqlDatabase>
java.lang.Object
liquibase.nosql.lockservice.AbstractNoSqlLockService<D>
- All Implemented Interfaces:
liquibase.lockservice.LockService,liquibase.servicelocator.PrioritizedService
- Direct Known Subclasses:
MongoLockService
public abstract class AbstractNoSqlLockService<D extends AbstractNoSqlDatabase>
extends Object
implements liquibase.lockservice.LockService
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected abstract voidprotected abstract voidvoiddestroy()protected abstract voidprotected abstract Booleanvoidprotected abstract liquibase.logging.Loggerintbooleanvoidinit()protected abstract BooleanisLocked()liquibase.lockservice.DatabaseChangeLogLock[]protected abstract List<liquibase.lockservice.DatabaseChangeLogLock>voidprotected abstract intreplaceLock(boolean locked) voidreset()voidsetChangeLogLockRecheckTime(long changeLogLockRecheckTime) voidsetChangeLogLockWaitTime(long changeLogLockWaitTime) voidsetDatabase(liquibase.database.Database database) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface liquibase.lockservice.LockService
supports
-
Constructor Details
-
AbstractNoSqlLockService
public AbstractNoSqlLockService()
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceliquibase.servicelocator.PrioritizedService
-
setDatabase
public void setDatabase(liquibase.database.Database database) - Specified by:
setDatabasein interfaceliquibase.lockservice.LockService
-
getDatabase
-
getExecutor
- Throws:
liquibase.exception.DatabaseException
-
init
public void init() throws liquibase.exception.DatabaseException- Specified by:
initin interfaceliquibase.lockservice.LockService- Throws:
liquibase.exception.DatabaseException
-
hasChangeLogLock
public boolean hasChangeLogLock()- Specified by:
hasChangeLogLockin interfaceliquibase.lockservice.LockService
-
waitForLock
public void waitForLock() throws liquibase.exception.LockException- Specified by:
waitForLockin interfaceliquibase.lockservice.LockService- Throws:
liquibase.exception.LockException
-
acquireLock
public boolean acquireLock() throws liquibase.exception.LockException- Specified by:
acquireLockin interfaceliquibase.lockservice.LockService- Throws:
liquibase.exception.LockException
-
releaseLock
public void releaseLock() throws liquibase.exception.LockException- Specified by:
releaseLockin interfaceliquibase.lockservice.LockService- Throws:
liquibase.exception.LockException
-
listLocks
public liquibase.lockservice.DatabaseChangeLogLock[] listLocks() throws liquibase.exception.LockException- Specified by:
listLocksin interfaceliquibase.lockservice.LockService- Throws:
liquibase.exception.LockException
-
forceReleaseLock
public void forceReleaseLock() throws liquibase.exception.LockException, liquibase.exception.DatabaseException- Specified by:
forceReleaseLockin interfaceliquibase.lockservice.LockService- Throws:
liquibase.exception.LockExceptionliquibase.exception.DatabaseException
-
reset
public void reset()- Specified by:
resetin interfaceliquibase.lockservice.LockService
-
destroy
public void destroy()- Specified by:
destroyin interfaceliquibase.lockservice.LockService
-
getDatabaseChangeLogLockTableName
-
getChangeLogLockRecheckTime
-
setChangeLogLockRecheckTime
public void setChangeLogLockRecheckTime(long changeLogLockRecheckTime) - Specified by:
setChangeLogLockRecheckTimein interfaceliquibase.lockservice.LockService
-
getChangeLogLockWaitTime
-
setChangeLogLockWaitTime
public void setChangeLogLockWaitTime(long changeLogLockWaitTime) - Specified by:
setChangeLogLockWaitTimein interfaceliquibase.lockservice.LockService
-
getLogger
protected abstract liquibase.logging.Logger getLogger() -
existsRepository
- Throws:
liquibase.exception.DatabaseException
-
createRepository
protected abstract void createRepository() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
adjustRepository
protected abstract void adjustRepository() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
dropRepository
protected abstract void dropRepository() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
isLocked
- Throws:
liquibase.exception.DatabaseException
-
replaceLock
protected abstract int replaceLock(boolean locked) throws liquibase.exception.DatabaseException - Throws:
liquibase.exception.DatabaseException
-
queryLocks
protected abstract List<liquibase.lockservice.DatabaseChangeLogLock> queryLocks() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-