public class InstanceLockGroup extends Object implements LockGroup
LockGroup implementation for holding references
to created locks inside a mule instance.| Modifier and Type | Class and Description |
|---|---|
static class |
InstanceLockGroup.LockEntry |
PHASE_NAME| Constructor and Description |
|---|
InstanceLockGroup(LockProvider lockProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
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()
Disposabledispose in interface DisposableCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.