public interface LockGroup extends Disposable
LockFactory
in order
to release memory of no longer referenced locks.PHASE_NAME
Modifier and Type | Method and Description |
---|---|
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 lockId) |
dispose
void lock(String lockId)
void unlock(String lockId)
boolean tryLock(String lockId, long timeout, TimeUnit timeUnit) throws InterruptedException
timeout
- the time in timeUnit to wait until the lock is acquiredtimeUnit
- the time unit of timeoutInterruptedException
- if thread was interrupted during the lock acquisitionboolean tryLock(String lockId)
void lockInterruptibly(String lockId) throws InterruptedException
InterruptedException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.