Class LockRequest

java.lang.Object
com.sleepycat.db.LockRequest

public class LockRequest extends Object
The LockRequest object is used to encapsulate a single lock request.
  • Constructor Details

    • LockRequest

      public LockRequest(LockOperation op, LockRequestMode mode, DatabaseEntry obj)
      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

      public LockRequest(LockOperation op, LockRequestMode mode, DatabaseEntry obj, Lock lock)
      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

      public void setLock(Lock lock)
      Set the lock reference.

      Parameters:
      lock - The lock reference.
    • setMode

      public void setMode(LockRequestMode mode)
      Set the lock mode.

      Parameters:
      mode - the lock mode.
    • setObj

      public void setObj(DatabaseEntry obj)
      Set the lock object.

      Parameters:
      obj - The lock object.
    • setOp

      public void setOp(LockOperation op)
      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

      public Lock getLock()
      Return the lock reference.
    • getMode

      public LockRequestMode getMode()
      Return the lock mode.
    • getObj

      public DatabaseEntry getObj()
      Return the lock object.
    • getOp

      public LockOperation getOp()
      Return the lock operation.
    • getTimeout

      public int getTimeout()
      Return the lock timeout value.