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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlockConsentHub(ConsentHub consentHub) Create transaction lock for consentHub and also bind it to the transaction (as resource by Object uniqueKey)static voidlockGroupMembership(Group group) Create transaction locks for group and bind them to the transaction (as resource by Object uniqueKey)static voidlockGroupMembership(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 voidlockGroupMembership(List<Group> groups) Create transaction locks for list of Groups and bind them to the transaction (as resource by Object uniqueKey)static voidUnlock 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:
InternalErrorExceptionInterruptedException
-
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:
InternalErrorExceptionInterruptedException
-
unlockAll
Unlock all locks in argument list- Parameters:
locks- list of locks to unlock
-