liquibase.lockservice
Class StandardLockService

java.lang.Object
  extended by liquibase.lockservice.StandardLockService
All Implemented Interfaces:
LockService, PrioritizedService
Direct Known Subclasses:
LockServiceImpl

public class StandardLockService
extends Object
implements LockService


Field Summary
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
StandardLockService()
           
 
Method Summary
 boolean acquireLock()
           
 void destroy()
           
 void forceReleaseLock()
          Releases whatever locks are on the database change log table
 Long getChangeLogLockRecheckTime()
           
 Long getChangeLogLockWaitTime()
           
 int getPriority()
           
 boolean hasChangeLogLock()
           
 boolean hasDatabaseChangeLogLockTable()
           
 void init()
           
 boolean isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated)
           
 DatabaseChangeLogLock[] listLocks()
           
 void releaseLock()
           
 void reset()
          Clears information the lock handler knows about the tables.
 void setChangeLogLockRecheckTime(long changeLogLocRecheckTime)
           
 void setChangeLogLockWaitTime(long changeLogLockWaitTime)
           
 void setDatabase(Database database)
           
 boolean supports(Database database)
           
 void waitForLock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardLockService

public StandardLockService()
Method Detail

getPriority

public int getPriority()
Specified by:
getPriority in interface PrioritizedService

supports

public boolean supports(Database database)
Specified by:
supports in interface LockService

setDatabase

public void setDatabase(Database database)
Specified by:
setDatabase in interface LockService

getChangeLogLockWaitTime

public Long getChangeLogLockWaitTime()

setChangeLogLockWaitTime

public void setChangeLogLockWaitTime(long changeLogLockWaitTime)
Specified by:
setChangeLogLockWaitTime in interface LockService

setChangeLogLockRecheckTime

public void setChangeLogLockRecheckTime(long changeLogLocRecheckTime)
Specified by:
setChangeLogLockRecheckTime in interface LockService

getChangeLogLockRecheckTime

public Long getChangeLogLockRecheckTime()

init

public void init()
          throws DatabaseException
Specified by:
init in interface LockService
Throws:
DatabaseException

isDatabaseChangeLogLockTableInitialized

public boolean isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated)
                                                throws DatabaseException
Throws:
DatabaseException

hasChangeLogLock

public boolean hasChangeLogLock()
Specified by:
hasChangeLogLock in interface LockService

hasDatabaseChangeLogLockTable

public boolean hasDatabaseChangeLogLockTable()
                                      throws DatabaseException
Throws:
DatabaseException

waitForLock

public void waitForLock()
                 throws LockException
Specified by:
waitForLock in interface LockService
Throws:
LockException

acquireLock

public boolean acquireLock()
                    throws LockException
Specified by:
acquireLock in interface LockService
Throws:
LockException

releaseLock

public void releaseLock()
                 throws LockException
Specified by:
releaseLock in interface LockService
Throws:
LockException

listLocks

public DatabaseChangeLogLock[] listLocks()
                                  throws LockException
Specified by:
listLocks in interface LockService
Throws:
LockException

forceReleaseLock

public void forceReleaseLock()
                      throws LockException,
                             DatabaseException
Description copied from interface: LockService
Releases whatever locks are on the database change log table

Specified by:
forceReleaseLock in interface LockService
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 interface LockService

destroy

public void destroy()
             throws DatabaseException
Specified by:
destroy in interface LockService
Throws:
DatabaseException


Copyright © 2014 Liquibase.org. All rights reserved.