- java.lang.Object
-
- org.snmp4j.agent.mo.lock.LockRequest
-
public class LockRequest extends Object
TheLockRequest
class bundles information necessary to request a lock on aManagedObject
for update or value access.- Since:
- 2.4.0
- Author:
- Frank Fock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LockRequest.LockStatus
-
Constructor Summary
Constructors Constructor Description LockRequest(Object lockOwner, long timeoutMillis)
Creates a new lock request with owner and timeout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getLockOwner()
LockRequest.LockStatus
getLockRequestStatus()
long
getTimeoutMillis()
void
setLockRequestStatus(LockRequest.LockStatus lockRequestStatus)
-
-
-
Constructor Detail
-
LockRequest
public LockRequest(Object lockOwner, long timeoutMillis)
Creates a new lock request with owner and timeout.- Parameters:
lockOwner
- the owner of the lock. The same owner may lock a managed object again (recursively), seeMOServer.lock(Object, ManagedObject)
for details.timeoutMillis
- the number of 1/1000 seconds to wait for the lock. 0 or less disables the timeout and waits forever until the lock is released by the current owner.
-
-
Method Detail
-
getLockOwner
public Object getLockOwner()
-
getTimeoutMillis
public long getTimeoutMillis()
-
getLockRequestStatus
public LockRequest.LockStatus getLockRequestStatus()
-
setLockRequestStatus
public void setLockRequestStatus(LockRequest.LockStatus lockRequestStatus)
-
-