Class LockManager


  • public class LockManager
    extends Object
    Central class to manage locks
    Since:
    6.5
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • LockManager

        public LockManager()
    • 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 lock
        transactionId - 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 name
        transactionId - The transaction ID
      • setGenericDao

        public void setGenericDao​(GenericDAO genericDao)