Class LockManager

java.lang.Object
com.logicaldoc.core.lock.LockManager

@Component("LockManager") public class LockManager extends Object
Central class to manage locks
Since:
6.5
Author:
Marco Meschieri - LogicalDOC
  • Constructor Details

    • LockManager

      public LockManager()
  • Method Details

    • 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 lock
      transactionId - Id of the transaction
      Returns:
      true only if the lock was acquired
    • release

      public void release(String lockName, String transactionId) throws PersistenceException
      Releases a previously acquired lock.
      Parameters:
      lockName - The lock name
      transactionId - The transaction ID
      Throws:
      PersistenceException
    • setGenericDao

      public void setGenericDao(GenericDAO genericDao)
    • setConfig

      public void setConfig(ContextProperties config)