public class BeehiveLockDao extends Object implements cloud.atlassian.beehive.db.spi.ClusterLockDao
ClusterLockDao
.
All methods are executed outside current session's transaction.
Constructor and Description |
---|
BeehiveLockDao(org.hibernate.SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
void |
ensureClusterLockExists(String lockName,
long heartbeatTime) |
cloud.atlassian.beehive.db.ClusterLockStatus |
getClusterLockStatusByName(String lockName) |
int |
tryUpdateAcquireLock(String lockName,
String lockedByThread,
long heartbeatTime) |
int |
unlock(String lockName,
String lockedByThread) |
int |
writeHeartbeat(String lockName,
String lockedByThread,
long heartbeatTime) |
public BeehiveLockDao(org.hibernate.SessionFactory sessionFactory)
@Nullable public cloud.atlassian.beehive.db.ClusterLockStatus getClusterLockStatusByName(@Nonnull String lockName)
getClusterLockStatusByName
in interface cloud.atlassian.beehive.db.spi.ClusterLockDao
public int tryUpdateAcquireLock(@Nonnull String lockName, @Nonnull String lockedByThread, long heartbeatTime)
tryUpdateAcquireLock
in interface cloud.atlassian.beehive.db.spi.ClusterLockDao
public int writeHeartbeat(String lockName, String lockedByThread, long heartbeatTime)
writeHeartbeat
in interface cloud.atlassian.beehive.db.spi.ClusterLockDao
public void ensureClusterLockExists(@Nonnull String lockName, long heartbeatTime)
ensureClusterLockExists
in interface cloud.atlassian.beehive.db.spi.ClusterLockDao
Copyright © 2003–2017 Atlassian. All rights reserved.