Package com.logicaldoc.core.lock
Class LockManager
- java.lang.Object
 - 
- com.logicaldoc.core.lock.LockManager
 
 
- 
public class LockManager extends Object
Central class to manage locks- Since:
 - 6.5
 - Author:
 - Marco Meschieri - LogicalDOC
 
 
- 
- 
Constructor Summary
Constructors Constructor Description LockManager() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanget(String lockName, String transactionId)Acquire a lock of a given name and for a given transaction.List<String>getAllTransactions()Gets all the transaction ids associated to the locksvoidrelease(String lockName, String transactionId)Releases a previously acquired lock.voidsetConfig(ContextProperties config)voidsetGenericDao(GenericDAO genericDao) 
 - 
 
- 
- 
Method Detail
- 
getAllTransactions
public List<String> getAllTransactions()
Gets all the transaction ids associated to the locks- Returns:
 - the lists of transactions
 
 
- 
get
public boolean get(String lockName, String transactionId)
Acquire a lock of a given name and for a given transaction.- Parameters:
 lockName- Name of the locktransactionId- Id of the transaction- Returns:
 - true only if the lock was acquired
 
 
- 
release
public void release(String lockName, String transactionId)
Releases a previously acquired lock.- Parameters:
 lockName- The lock nametransactionId- The transaction ID
 
- 
setGenericDao
public void setGenericDao(GenericDAO genericDao)
 
- 
setConfig
public void setConfig(ContextProperties config)
 
 - 
 
 -