Package org.keycloak.utils
Class LockObjectsForModification
java.lang.Object
org.keycloak.utils.LockObjectsForModification
This flags the session that all information loaded from the stores should be locked as the service layer
 plans to modify it.
 This is just a hint to the underlying storage, and a store might choose to ignore it.
 The lock for any object retrieved from the session will be kept until the end of the transaction.
 If the store supports it, this could prevent exceptions due to optimistic locking
 problems later in the processing. If the caller retrieved objects without this wrapper, they would still be
 able to modify those objects, and those changes would be written to the store at the end of the transaction at the lastet,
 but they won't be locked.
- Author:
- Alexander Schwartz
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfacestatic class
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanisEnabled(KeycloakSession session, Class<?> model) static <V> VlockRealmsForModification(KeycloakSession session, LockObjectsForModification.CallableWithoutThrowingAnException<V> callable) static <V> VlockUserSessionsForModification(KeycloakSession session, LockObjectsForModification.CallableWithoutThrowingAnException<V> callable) 
- 
Constructor Details- 
LockObjectsForModificationpublic LockObjectsForModification()
 
- 
- 
Method Details- 
isEnabled
- 
lockUserSessionsForModificationpublic static <V> V lockUserSessionsForModification(KeycloakSession session, LockObjectsForModification.CallableWithoutThrowingAnException<V> callable) 
- 
lockRealmsForModificationpublic static <V> V lockRealmsForModification(KeycloakSession session, LockObjectsForModification.CallableWithoutThrowingAnException<V> callable) 
 
-