public class StandardLockService extends Object implements LockService
| Modifier and Type | Field and Description |
|---|---|
protected Long |
changeLogLockPollRate |
protected Long |
changeLogLockRecheckTime |
protected static ResourceBundle |
coreBundle |
protected Database |
database |
protected boolean |
hasChangeLogLock |
protected Boolean |
hasDatabaseChangeLogLockTable |
protected boolean |
isDatabaseChangeLogLockTableInitialized |
protected ObjectQuotingStrategy |
quotingStrategy |
protected SecureRandom |
random |
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT| Constructor and Description |
|---|
StandardLockService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock() |
void |
destroy() |
void |
forceReleaseLock()
Releases whatever locks are on the database change log table
|
protected Long |
getChangeLogLockRecheckTime() |
protected Long |
getChangeLogLockWaitTime() |
int |
getPriority() |
boolean |
hasChangeLogLock() |
protected boolean |
hasDatabaseChangeLogLockTable() |
protected boolean |
hasDatabaseChangeLogLockTable(boolean forceRecheck)
Check whether the databasechangeloglock table exists in the database.
|
void |
init() |
boolean |
isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated) |
protected boolean |
isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated,
boolean forceRecheck)
Determine whether the databasechangeloglock table has been initialized.
|
DatabaseChangeLogLock[] |
listLocks() |
void |
releaseLock() |
void |
reset()
Clears information the lock handler knows about the tables.
|
void |
setChangeLogLockRecheckTime(long changeLogLockRecheckTime) |
void |
setChangeLogLockWaitTime(long changeLogLockWaitTime) |
void |
setDatabase(Database database) |
boolean |
supports(Database database) |
void |
waitForLock() |
protected static final ResourceBundle coreBundle
protected Database database
protected boolean hasChangeLogLock
protected Long changeLogLockPollRate
protected Long changeLogLockRecheckTime
protected Boolean hasDatabaseChangeLogLockTable
protected boolean isDatabaseChangeLogLockTableInitialized
protected ObjectQuotingStrategy quotingStrategy
protected final SecureRandom random
public int getPriority()
getPriority in interface PrioritizedServicepublic boolean supports(Database database)
supports in interface LockServicepublic void setDatabase(Database database)
setDatabase in interface LockServiceprotected Long getChangeLogLockWaitTime()
public void setChangeLogLockWaitTime(long changeLogLockWaitTime)
setChangeLogLockWaitTime in interface LockServiceprotected Long getChangeLogLockRecheckTime()
public void setChangeLogLockRecheckTime(long changeLogLockRecheckTime)
setChangeLogLockRecheckTime in interface LockServicepublic void init()
throws DatabaseException
init in interface LockServiceDatabaseExceptionpublic boolean isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated)
protected boolean isDatabaseChangeLogLockTableInitialized(boolean tableJustCreated,
boolean forceRecheck)
forceRecheck - if true, do not use any cached information, and recheck the actual databasepublic boolean hasChangeLogLock()
hasChangeLogLock in interface LockServiceprotected boolean hasDatabaseChangeLogLockTable(boolean forceRecheck)
forceRecheck - if true, do not use any cached information and check the actual databaseprotected boolean hasDatabaseChangeLogLockTable()
throws DatabaseException
DatabaseExceptionpublic void waitForLock()
throws LockException
waitForLock in interface LockServiceLockExceptionpublic boolean acquireLock()
throws LockException
acquireLock in interface LockServiceLockExceptionpublic void releaseLock()
throws LockException
releaseLock in interface LockServiceLockExceptionpublic DatabaseChangeLogLock[] listLocks() throws LockException
listLocks in interface LockServiceLockExceptionpublic void forceReleaseLock()
throws LockException,
DatabaseException
LockServiceforceReleaseLock in interface LockServiceLockExceptionDatabaseExceptionpublic void reset()
LockServicereset in interface LockServicepublic void destroy()
throws DatabaseException
destroy in interface LockServiceDatabaseExceptionCopyright © 2023 Liquibase.org. All rights reserved.