Package com.sleepycat.db
Class LockRequest
java.lang.Object
com.sleepycat.db.LockRequest
The LockRequest object is used to encapsulate a single lock request.
-
Constructor Summary
ConstructorsConstructorDescriptionLockRequest(LockOperation op, LockRequestMode mode, DatabaseEntry obj) Construct a LockRequest with the specified operation and mode for the specified object.LockRequest(LockOperation op, LockRequestMode mode, DatabaseEntry obj, Lock lock) Construct a LockRequest with the specified operation, mode and lock, for the specified object.LockRequest(LockOperation op, LockRequestMode mode, DatabaseEntry obj, Lock lock, int timeout) Construct a LockRequest with the specified operation, mode, lock and timeout for the specified object. -
Method Summary
Modifier and TypeMethodDescriptiongetLock()Return the lock reference.getMode()Return the lock mode.getObj()Return the lock object.getOp()Return the lock operation.intReturn the lock timeout value.voidSet the lock reference.voidsetMode(LockRequestMode mode) Set the lock mode.voidsetObj(DatabaseEntry obj) Set the lock object.voidsetOp(LockOperation op) Set the operation.voidsetTimeout(int timeout) Set the lock timeout value.
-
Constructor Details
-
LockRequest
Construct a LockRequest with the specified operation and mode for the specified object.- Parameters:
op- The operation being performed.mode- The permissions mode for the object.obj- The object being locked.
-
LockRequest
Construct a LockRequest with the specified operation, mode and lock, for the specified object.- Parameters:
op- The operation being performed.mode- The permissions mode for the object.obj- The object being locked.lock- The lock type for the object.
-
LockRequest
public LockRequest(LockOperation op, LockRequestMode mode, DatabaseEntry obj, Lock lock, int timeout) Construct a LockRequest with the specified operation, mode, lock and timeout for the specified object.- Parameters:
op- The operation being performed.mode- The permissions mode for the object.obj- The object being locked.lock- The lock type for the object.timeout- The timeout value for the lock.
-
-
Method Details
-
setLock
Set the lock reference.- Parameters:
lock- The lock reference.
-
setMode
Set the lock mode.- Parameters:
mode- the lock mode.
-
setObj
Set the lock object.- Parameters:
obj- The lock object.
-
setOp
Set the operation.- Parameters:
op- The operation.
-
setTimeout
public void setTimeout(int timeout) Set the lock timeout value.- Parameters:
timeout- The lock timeout value.
-
getLock
Return the lock reference. -
getMode
Return the lock mode. -
getObj
Return the lock object. -
getOp
Return the lock operation. -
getTimeout
public int getTimeout()Return the lock timeout value.
-