-
- All Known Implementing Classes:
DefaultMOLockStrategy
public interface MOLockStrategyTheMOLockStrategyinterface defines a strategy for lockingManagedObjectinstances when they are accessed through aMOServer.- Since:
- 2.4.0
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisLockNeeded(ManagedObject<?> managedObjectLookedUp, MOQuery query)Check if the server access to the provided managed object needs a lock.
-
-
-
Method Detail
-
isLockNeeded
boolean isLockNeeded(ManagedObject<?> managedObjectLookedUp, MOQuery query)
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.
-
-