Class LockObjectsForModification

java.lang.Object
org.keycloak.utils.LockObjectsForModification

public class LockObjectsForModification extends Object
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