com.agimatec.dbmigrate.util
Class BusyLocker
java.lang.Object
com.agimatec.dbmigrate.util.BusyLocker
public class BusyLocker
- extends Object
Description: Implements the behavior to prevent dbmigrate to execute more than once at the same time
on the same database
It INSERTs a "busy" version into the database and DELETEs it afterwards.
Date: 14.10.14
- Since:
- 2.5.19
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUSY_VERSION
protected final String BUSY_VERSION
- See Also:
- Constant Field Values
log
protected static final org.slf4j.Logger log
ownLock
protected boolean ownLock
BusyLocker
public BusyLocker()
getMaxAttempts
public int getMaxAttempts()
setMaxAttempts
public void setMaxAttempts(int maxAttempts)
getDelayBetweenAttempts
public int getDelayBetweenAttempts()
setDelayBetweenAttempts
public void setDelayBetweenAttempts(int delayBetweenAttempts)
isEnabled
public boolean isEnabled(DBVersionMeta dbVersionMeta)
lockBusy
public void lockBusy(DBVersionMeta dbVersionMeta,
JdbcDatabase database)
isOwnLock
public boolean isOwnLock()
setOwnLock
public void setOwnLock(boolean ownLock)
unlockBusy
public void unlockBusy(DBVersionMeta dbVersionMeta,
JdbcDatabase database)
Copyright © 2008-2014. All Rights Reserved.