Package com.coditory.sherlock
Class SherlockStub
- java.lang.Object
-
- com.coditory.sherlock.SherlockStub
-
-
Constructor Summary
Constructors Constructor Description SherlockStub()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DistributedLockcreateLock(String lockId)DistributedLockcreateLock(String lockId, Duration duration)DistributedLockcreateOverridingLock(String lockId)DistributedLockcreateOverridingLock(String lockId, Duration duration)DistributedLockcreateReentrantLock(String lockId)DistributedLockcreateReentrantLock(String lockId, Duration duration)StringgetInstanceId()DurationgetLockDuration()static SherlockStubwithClosedLocks()SherlockStubwithLock(DistributedLock lock)SherlockStubwithLockDuration(Duration duration)static SherlockStubwithOpenedLocks()SherlockStubwithServiceInstanceId(String instanceId)
-
-
-
Method Detail
-
withOpenedLocks
public static SherlockStub withOpenedLocks()
-
withClosedLocks
public static SherlockStub withClosedLocks()
-
withServiceInstanceId
public SherlockStub withServiceInstanceId(String instanceId)
-
withLockDuration
public SherlockStub withLockDuration(Duration duration)
-
withLock
public SherlockStub withLock(DistributedLock lock)
-
getInstanceId
public String getInstanceId()
- Specified by:
getInstanceIdin interfaceSherlock
-
getLockDuration
public Duration getLockDuration()
- Specified by:
getLockDurationin interfaceSherlock
-
createReentrantLock
public DistributedLock createReentrantLock(String lockId)
- Specified by:
createReentrantLockin interfaceSherlock
-
createReentrantLock
public DistributedLock createReentrantLock(String lockId, Duration duration)
- Specified by:
createReentrantLockin interfaceSherlock
-
createLock
public DistributedLock createLock(String lockId)
- Specified by:
createLockin interfaceSherlock
-
createLock
public DistributedLock createLock(String lockId, Duration duration)
- Specified by:
createLockin interfaceSherlock
-
createOverridingLock
public DistributedLock createOverridingLock(String lockId)
- Specified by:
createOverridingLockin interfaceSherlock
-
createOverridingLock
public DistributedLock createOverridingLock(String lockId, Duration duration)
- Specified by:
createOverridingLockin interfaceSherlock
-
-