Package com.logicaldoc.core.lock
Class LockManager
java.lang.Object
com.logicaldoc.core.lock.LockManager
Central class to manage locks
- Since:
- 6.5
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Acquire a lock of a given name and for a given transaction.Gets all the transaction ids associated to the locksvoid
Releases a previously acquired lock.void
setConfig
(ContextProperties config) void
setGenericDao
(GenericDAO genericDao)
-
Constructor Details
-
LockManager
public LockManager()
-
-
Method Details
-
getAllTransactions
Gets all the transaction ids associated to the locks- Returns:
- the lists of transactions
-
get
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
Releases a previously acquired lock.- Parameters:
lockName
- The lock nametransactionId
- The transaction ID- Throws:
PersistenceException
-
setGenericDao
-
setConfig
-