public class DefaultMOLockStrategy extends Object implements MOLockStrategy
DefaultMOLockStrategyimplements a simple default locking strategy that requires a lock if a write access on a
ManagedObjectis intended or if the managed object accessed is an instance of
UpdatableManagedObject. A managed object server that uses this lock strategy ensures that two concurrently received SET requests will not modify the same managed object at the same time with probably undefined result. In addition, managed objects that need to be updated regularly are protected against access while
|Constructor and Description|
|Modifier and Type||Method and Description|
Check if the server access to the provided managed object needs a lock.
public boolean isLockNeeded(ManagedObject managedObjectLookedUp, MOQuery query)
managedObjectLookedUp- the ManagedObject instance that is looked up and potentially accessed.
query- the query on which behalf the lookup took place. It also signals with
MOQuery.isWriteAccessQuery()whether a write access is intended or not.
trueif a lock is required to access the provided managed object,
Copyright © 2016 SNMP4J.org. All rights reserved.