Class AbstractNoSqlLockService<D extends AbstractNoSqlDatabase>

  • 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
    • Constructor Detail

      • AbstractNoSqlLockService

        public AbstractNoSqlLockService()
    • Method Detail

      • getPriority

        public int getPriority()
        Specified by:
        getPriority in interface liquibase.servicelocator.PrioritizedService
      • setDatabase

        public void setDatabase​(liquibase.database.Database database)
        Specified by:
        setDatabase in interface liquibase.lockservice.LockService
      • getDatabase

        public D getDatabase()
      • getExecutor

        public NoSqlExecutor getExecutor()
                                  throws liquibase.exception.DatabaseException
        Throws:
        liquibase.exception.DatabaseException
      • init

        public void init()
                  throws liquibase.exception.DatabaseException
        Specified by:
        init in interface liquibase.lockservice.LockService
        Throws:
        liquibase.exception.DatabaseException
      • hasChangeLogLock

        public boolean hasChangeLogLock()
        Specified by:
        hasChangeLogLock in interface liquibase.lockservice.LockService
      • waitForLock

        public void waitForLock()
                         throws liquibase.exception.LockException
        Specified by:
        waitForLock in interface liquibase.lockservice.LockService
        Throws:
        liquibase.exception.LockException
      • acquireLock

        public boolean acquireLock()
                            throws liquibase.exception.LockException
        Specified by:
        acquireLock in interface liquibase.lockservice.LockService
        Throws:
        liquibase.exception.LockException
      • releaseLock

        public void releaseLock()
                         throws liquibase.exception.LockException
        Specified by:
        releaseLock in interface liquibase.lockservice.LockService
        Throws:
        liquibase.exception.LockException
      • listLocks

        public liquibase.lockservice.DatabaseChangeLogLock[] listLocks()
                                                                throws liquibase.exception.LockException
        Specified by:
        listLocks in interface liquibase.lockservice.LockService
        Throws:
        liquibase.exception.LockException
      • forceReleaseLock

        public void forceReleaseLock()
                              throws liquibase.exception.LockException,
                                     liquibase.exception.DatabaseException
        Specified by:
        forceReleaseLock in interface liquibase.lockservice.LockService
        Throws:
        liquibase.exception.LockException
        liquibase.exception.DatabaseException
      • reset

        public void reset()
        Specified by:
        reset in interface liquibase.lockservice.LockService
      • destroy

        public void destroy()
        Specified by:
        destroy in interface liquibase.lockservice.LockService
      • getDatabaseChangeLogLockTableName

        public String getDatabaseChangeLogLockTableName()
      • getChangeLogLockRecheckTime

        public Long getChangeLogLockRecheckTime()
      • setChangeLogLockRecheckTime

        public void setChangeLogLockRecheckTime​(long changeLogLockRecheckTime)
        Specified by:
        setChangeLogLockRecheckTime in interface liquibase.lockservice.LockService
      • getChangeLogLockWaitTime

        public Long getChangeLogLockWaitTime()
      • setChangeLogLockWaitTime

        public void setChangeLogLockWaitTime​(long changeLogLockWaitTime)
        Specified by:
        setChangeLogLockWaitTime in interface liquibase.lockservice.LockService
      • getLogger

        protected abstract liquibase.logging.Logger getLogger()
      • existsRepository

        protected abstract Boolean existsRepository()
                                             throws liquibase.exception.DatabaseException
        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

        protected abstract Boolean isLocked()
                                     throws liquibase.exception.DatabaseException
        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