| Modifier and Type | Class and Description |
|---|---|
static class |
InstanceLockGroup.LockEntry |
| Constructor and Description |
|---|
InstanceLockGroup(LockProvider lockProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
lock(String lockId) |
void |
lockInterruptibly(String lockId) |
boolean |
tryLock(String lockId) |
boolean |
tryLock(String lockId,
long timeout,
TimeUnit timeUnit)
Tries to acquire the lock for a certain amount of time
|
void |
unlock(String key) |
public InstanceLockGroup(LockProvider lockProvider)
public boolean tryLock(String lockId, long timeout, TimeUnit timeUnit) throws InterruptedException
LockGrouptryLock in interface LockGrouptimeout - the time in timeUnit to wait until the lock is acquiredtimeUnit - the time unit of timeoutInterruptedException - if thread was interrupted during the lock acquisitionpublic void lockInterruptibly(String lockId) throws InterruptedException
lockInterruptibly in interface LockGroupInterruptedExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.DisposableCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.