com.atlassian.beehive.spi
Class MockClusterLockDao

java.lang.Object
  extended by com.atlassian.beehive.spi.MockClusterLockDao
All Implemented Interfaces:
ClusterLockDao

public class MockClusterLockDao
extends Object
implements ClusterLockDao


Constructor Summary
MockClusterLockDao()
           
 
Method Summary
 void deleteLocksHeldByNode(String nodeId)
           
 ClusterLockStatus getClusterLockStatusByName(String lockName)
           
 void insertEmptyClusterLock(String lockName, long updateTime)
           
 boolean tryUpdateAcquireLock(String lockName, String nodeId, long updateTime)
           
 void unlock(String lockName, String nodeId, long updateTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockClusterLockDao

public MockClusterLockDao()
Method Detail

getClusterLockStatusByName

public ClusterLockStatus getClusterLockStatusByName(@Nonnull
                                                    String lockName)
Specified by:
getClusterLockStatusByName in interface ClusterLockDao

tryUpdateAcquireLock

public boolean tryUpdateAcquireLock(@Nonnull
                                    String lockName,
                                    @Nonnull
                                    String nodeId,
                                    long updateTime)
Specified by:
tryUpdateAcquireLock in interface ClusterLockDao

insertEmptyClusterLock

public void insertEmptyClusterLock(@Nonnull
                                   String lockName,
                                   long updateTime)
Specified by:
insertEmptyClusterLock in interface ClusterLockDao

unlock

public void unlock(@Nonnull
                   String lockName,
                   @Nonnull
                   String nodeId,
                   long updateTime)
Specified by:
unlock in interface ClusterLockDao

deleteLocksHeldByNode

public void deleteLocksHeldByNode(@Nonnull
                                  String nodeId)
Specified by:
deleteLocksHeldByNode in interface ClusterLockDao


Copyright © 2014 Atlassian. All Rights Reserved.