Class PerunLocksUtils

java.lang.Object
cz.metacentrum.perun.core.impl.PerunLocksUtils

public class PerunLocksUtils extends Object
Methods and structures for working with locks on objects and actions.

Created by Michal Stava stavamichal@gmail.com

  • Field Details

  • Method Details

    • lockConsentHub

      public static void lockConsentHub(ConsentHub consentHub)
      Create transaction lock for consentHub and also bind it to the transaction (as resource by Object uniqueKey)
      Parameters:
      consentHub - the consentHub
    • lockGroupMembership

      public static void lockGroupMembership(List<Group> groups)
      Create transaction locks for list of Groups and bind them to the transaction (as resource by Object uniqueKey)
      Parameters:
      groups - list of groups
      Throws:
      InternalErrorException
    • lockGroupMembership

      public static void lockGroupMembership(Group group)
      Create transaction locks for group and bind them to the transaction (as resource by Object uniqueKey)
      Parameters:
      group - the group
      Throws:
      InternalErrorException
      InterruptedException
    • lockGroupMembership

      public static void lockGroupMembership(Group group, List<Member> members)
      Create transaction locks for combination of group and member (from list of members) and also bind them to the transaction (as resource by Object uniqueKey)
      Parameters:
      group - the group
      members - list of members
      Throws:
      InternalErrorException
      InterruptedException
    • unlockAll

      public static void unlockAll(List<Lock> locks)
      Unlock all locks in argument list
      Parameters:
      locks - list of locks to unlock