public interface LockService
ReentrantReadWriteLock| Modifier and Type | Method and Description |
|---|---|
BonitaLock |
lock(long objectToLockId,
java.lang.String objectType,
long tenantId)
Acquire the lock for the object having type and id in parameters
This method wait for the lock to be available |
BonitaLock |
tryLock(long objectToLockId,
java.lang.String objectType,
long timeout,
java.util.concurrent.TimeUnit timeUnit,
long tenantId)
Acquire the lock for the object having type and id in parameters waiting maximum timeout
This method wait for the lock to be available. |
void |
unlock(BonitaLock lock,
long tenantId) |
void unlock(BonitaLock lock, long tenantId) throws SLockException
SLockExceptionBonitaLock lock(long objectToLockId, java.lang.String objectType, long tenantId) throws SLockException, SLockTimeoutException
objectToLockId - objectType - tenantId - TODOSLockException - when we were unable to lock due to an unexpected errorSLockTimeoutException - when we were unable to lock due to a timeoutBonitaLock tryLock(long objectToLockId, java.lang.String objectType, long timeout, java.util.concurrent.TimeUnit timeUnit, long tenantId) throws SLockException
objectToLockId - objectType - timeout - timeUnit - tenantId - SLockException - when we were unable to lock (not because of the timeout)