public final class MemoryLockConditionService extends Object implements LockService
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debugEnable |
protected int |
lockTimeout |
protected TechnicalLoggerService |
logger |
| Constructor and Description |
|---|
MemoryLockConditionService(TechnicalLoggerService logger,
ReadSessionAccessor sessionAccessor,
int lockTimeout,
int lockPoolSize) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildKey(long objectToLockId,
String objectType) |
BonitaLock |
lock(long objectToLockId,
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,
String objectType,
long timeout,
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 bonitaLock,
long tenantId) |
protected final TechnicalLoggerService logger
protected final int lockTimeout
protected final boolean debugEnable
public MemoryLockConditionService(TechnicalLoggerService logger, ReadSessionAccessor sessionAccessor, int lockTimeout, int lockPoolSize)
logger - sessionAccessor - lockTimeout - timeout to obtain a lock in secondspublic BonitaLock tryLock(long objectToLockId, String objectType, long timeout, TimeUnit timeUnit, long tenantId)
LockServicetryLock in interface LockServicetenantId - TODOpublic BonitaLock lock(long objectToLockId, String objectType, long tenantId) throws SLockException
LockServicelock in interface LockServicetenantId - TODOSLockExceptionpublic void unlock(BonitaLock bonitaLock, long tenantId) throws SLockException
unlock in interface LockServiceSLockExceptionCopyright © 2019 Bonitasoft S.A.. All rights reserved.