- All Known Implementing Classes:
DefaultMOLockStrategy
public interface MOLockStrategy
The
MOLockStrategy interface defines a strategy for locking ManagedObject
instances when they are accessed through a MOServer.- Since:
- 2.4.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisLockNeeded(ManagedObject<?> managedObjectLookedUp, MOQuery query) Check if the server access to the provided managed object needs a lock.
-
Method Details
-
isLockNeeded
Check if the server access to the provided managed object needs a lock.- Parameters:
managedObjectLookedUp- the ManagedObject instance that is looked up and potentially accessed.query- the query on which behalf the lookup took place. It also signals withMOQuery.isWriteAccessQuery()whether a write access is intended or not.- Returns:
trueif a lock is required to access the provided managed object,falseotherwise.
-