public class MemoryLockService extends Object implements org.bonitasoft.engine.lock.LockService
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debugEnable |
protected int |
lockTimeout |
protected org.bonitasoft.engine.log.technical.TechnicalLoggerService |
logger |
protected static String |
SEPARATOR |
| Constructor and Description |
|---|
MemoryLockService(org.bonitasoft.engine.log.technical.TechnicalLoggerService logger,
int lockTimeout,
int lockPoolSize) |
| Modifier and Type | Method and Description |
|---|---|
protected ReentrantLock |
getLock(String key) |
org.bonitasoft.engine.lock.BonitaLock |
lock(long objectToLockId,
String objectType,
long tenantId) |
protected ReentrantLock |
removeLockFromMapIfNotUsed(String key) |
org.bonitasoft.engine.lock.BonitaLock |
tryLock(long objectToLockId,
String objectType,
long timeout,
TimeUnit timeUnit,
long tenantId) |
void |
unlock(org.bonitasoft.engine.lock.BonitaLock lock,
long tenantId) |
protected static final String SEPARATOR
protected final org.bonitasoft.engine.log.technical.TechnicalLoggerService logger
protected final int lockTimeout
protected final boolean debugEnable
public MemoryLockService(org.bonitasoft.engine.log.technical.TechnicalLoggerService logger,
int lockTimeout,
int lockPoolSize)
logger - sessionAccessor - lockTimeout - timeout to obtain a lock in secondsprotected ReentrantLock getLock(String key)
protected ReentrantLock removeLockFromMapIfNotUsed(String key)
public void unlock(org.bonitasoft.engine.lock.BonitaLock lock,
long tenantId)
throws org.bonitasoft.engine.lock.SLockException
unlock in interface org.bonitasoft.engine.lock.LockServiceorg.bonitasoft.engine.lock.SLockExceptionpublic org.bonitasoft.engine.lock.BonitaLock tryLock(long objectToLockId,
String objectType,
long timeout,
TimeUnit timeUnit,
long tenantId)
tryLock in interface org.bonitasoft.engine.lock.LockServicepublic org.bonitasoft.engine.lock.BonitaLock lock(long objectToLockId,
String objectType,
long tenantId)
throws org.bonitasoft.engine.lock.SLockException
lock in interface org.bonitasoft.engine.lock.LockServiceorg.bonitasoft.engine.lock.SLockExceptionCopyright © 2013 BonitaSoft. All Rights Reserved.