-
- All Known Implementing Classes:
DefaultMOLockStrategy
public interface MOLockStrategy
TheMOLockStrategy
interface defines a strategy for lockingManagedObject
instances 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 boolean
isLockNeeded(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:
true
if a lock is required to access the provided managed object,false
otherwise.
-
-