public abstract class JiraClusterLockQueryDSLDao extends Object implements com.atlassian.beehive.db.spi.ClusterLockDao, ClusterLockCleanupDao
| Modifier and Type | Field and Description |
|---|---|
static long |
LEASE_EXPIRY_TIME_MS |
| Constructor and Description |
|---|
JiraClusterLockQueryDSLDao(QueryDslAccessor queryDslAccessor,
ClusterNodeHeartBeatDao clusterNodeHeartBeatDao,
DatabaseSystemTimeReaderFactory databaseSystemTimeReaderFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract com.querydsl.sql.dml.SQLUpdateClause |
getAcquireLockQuery(DbConnection dbConnection,
String lockName,
Long dbTime) |
List<com.atlassian.beehive.core.ClusterLockStatus> |
getAllHeldClusterLocks() |
com.atlassian.beehive.core.ClusterLockStatus |
getClusterLockStatusByName(String lockName) |
protected long |
getDatabaseTime() |
protected abstract com.querydsl.sql.SQLQuery |
getHeldClusterLocksQuery(DbConnection dbConnection,
Long dbTime) |
void |
insertEmptyClusterLock(String lockName) |
void |
releaseAllClusterLocks()
Release all cluster locks.
|
void |
releaseLocksHeldByNode() |
void |
renewLease(String lockName) |
boolean |
tryAcquireLock(String lockName) |
void |
unlock(String lockName) |
public JiraClusterLockQueryDSLDao(QueryDslAccessor queryDslAccessor, ClusterNodeHeartBeatDao clusterNodeHeartBeatDao, DatabaseSystemTimeReaderFactory databaseSystemTimeReaderFactory)
@Nonnull public List<com.atlassian.beehive.core.ClusterLockStatus> getAllHeldClusterLocks()
getAllHeldClusterLocks in interface com.atlassian.beehive.db.spi.ClusterLockDao@Nullable public com.atlassian.beehive.core.ClusterLockStatus getClusterLockStatusByName(@Nonnull String lockName)
getClusterLockStatusByName in interface com.atlassian.beehive.db.spi.ClusterLockDaopublic boolean tryAcquireLock(@Nonnull String lockName)
tryAcquireLock in interface com.atlassian.beehive.db.spi.ClusterLockDaopublic void insertEmptyClusterLock(@Nonnull String lockName)
insertEmptyClusterLock in interface com.atlassian.beehive.db.spi.ClusterLockDaopublic void unlock(@Nonnull String lockName)
unlock in interface com.atlassian.beehive.db.spi.ClusterLockDaopublic void releaseAllClusterLocks()
ClusterLockCleanupDaoreleaseAllClusterLocks in interface ClusterLockCleanupDaopublic void renewLease(@Nonnull String lockName)
renewLease in interface com.atlassian.beehive.db.spi.ClusterLockDaopublic void releaseLocksHeldByNode()
releaseLocksHeldByNode in interface com.atlassian.beehive.db.spi.ClusterLockDaoprotected long getDatabaseTime()
protected abstract com.querydsl.sql.SQLQuery getHeldClusterLocksQuery(DbConnection dbConnection, Long dbTime)
protected abstract com.querydsl.sql.dml.SQLUpdateClause getAcquireLockQuery(DbConnection dbConnection, String lockName, Long dbTime)
Copyright © 2002-2020 Atlassian. All Rights Reserved.