public class LockRequest extends Object
LockRequest
class bundles information necessary to request a lock on a
ManagedObject
for update or value access.Modifier and Type | Class and Description |
---|---|
static class |
LockRequest.LockStatus |
Constructor and Description |
---|
LockRequest(Object lockOwner,
long timeoutMillis)
Creates a new lock request with owner and timeout.
|
Modifier and Type | Method and Description |
---|---|
Object |
getLockOwner() |
LockRequest.LockStatus |
getLockRequestStatus() |
long |
getTimeoutMillis() |
void |
setLockRequestStatus(LockRequest.LockStatus lockRequestStatus) |
public LockRequest(Object lockOwner, long timeoutMillis)
lockOwner
- the owner of the lock. The same owner may lock a managed object again
(recursively), see MOServer.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.public Object getLockOwner()
public long getTimeoutMillis()
public LockRequest.LockStatus getLockRequestStatus()
public void setLockRequestStatus(LockRequest.LockStatus lockRequestStatus)
Copyright © 2017 SNMP4J.org. All rights reserved.