public interface ResourceLockManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock(String resourceName,
String lockName)
Acquires a lock for the given resource name using the given lock name.
|
boolean |
acquireLock(String resourceName,
String lockName,
int ttl)
Acquires a lock for the given resource name using the given lock name.
|
void |
releaseLock(String resourceName,
String lockName)
Releases a lock for the given resource name using the given lock name.
|
boolean acquireLock(String resourceName, String lockName) throws ResourceLockException
resourceName - the resource name to be locked onlockName - the name of the locktrue if the lock was acquired, false
otherwiseResourceLockException - in case an error occursboolean acquireLock(String resourceName, String lockName, int ttl) throws ResourceLockException
resourceName - the resource name to be locked onlockName - the name of the lockttl - the time the lock exists in secondstrue if the lock was acquired, false
otherwiseResourceLockException - in case an error occursvoid releaseLock(String resourceName, String lockName) throws ResourceLockException
resourceName - the resource name to be locked onlockName - the name of the lockResourceLockException - in case an error occursCopyright © 2017 Zalando SE. All rights reserved.