Package cz.metacentrum.perun.core.impl
Class PerunLocksUtils
java.lang.Object
cz.metacentrum.perun.core.impl.PerunLocksUtils
Methods and structures for working with locks on objects and actions.
Created by Michal Stava stavamichal@gmail.com
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
lockConsentHub
(ConsentHub consentHub) Create transaction lock for consentHub and also bind it to the transaction (as resource by Object uniqueKey)static void
lockGroupMembership
(Group group) Create transaction locks for group and bind them to the transaction (as resource by Object uniqueKey)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)static void
lockGroupMembership
(List<Group> groups) Create transaction locks for list of Groups and bind them to the transaction (as resource by Object uniqueKey)static void
Unlock all locks in argument list
-
Field Details
-
UNIQUE_KEY
-
-
Method Details
-
lockConsentHub
Create transaction lock for consentHub and also bind it to the transaction (as resource by Object uniqueKey)- Parameters:
consentHub
- the consentHub
-
lockGroupMembership
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
Create transaction locks for group and bind them to the transaction (as resource by Object uniqueKey)- Parameters:
group
- the group- Throws:
InternalErrorException
InterruptedException
-
lockGroupMembership
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 groupmembers
- list of members- Throws:
InternalErrorException
InterruptedException
-
unlockAll
Unlock all locks in argument list- Parameters:
locks
- list of locks to unlock
-