Berkeley DB
version 5.3.21

com.sleepycat.db
Class LockOperation

java.lang.Object
  extended by com.sleepycat.db.LockOperation

public final class LockOperation
extends Object

Operations that can be performed on locks.


Field Summary
static LockOperation GET
          Get the lock defined by the values of the mode and obj fields, for the specified locker.
static LockOperation GET_TIMEOUT
          Identical to LockOperation GET except that the value in the timeout field overrides any previously specified timeout value for this lock.
static LockOperation PUT
          The lock to which the lock field refers is released.
static LockOperation PUT_ALL
          All locks held by the specified locker are released.
static LockOperation PUT_OBJ
          All locks held on obj are released.
static LockOperation TIMEOUT
          Cause the specified locker to timeout immediately.
 
Method Summary
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GET

public static final LockOperation GET
Get the lock defined by the values of the mode and obj fields, for the specified locker. Upon return from Environment.lockVector, if the lock field is non-null, a reference to the acquired lock is stored there. (This reference is invalidated by any call to Environment.lockVector or Environment.putLock that releases the lock.)


GET_TIMEOUT

public static final LockOperation GET_TIMEOUT
Identical to LockOperation GET except that the value in the timeout field overrides any previously specified timeout value for this lock. A value of 0 turns off any previously specified timeout.


PUT

public static final LockOperation PUT
The lock to which the lock field refers is released. The locker, mode and obj fields are ignored.


PUT_ALL

public static final LockOperation PUT_ALL
All locks held by the specified locker are released. The lock, mode, and obj fields are ignored. Locks acquired in operations performed by the current call to Environment.lockVector which appear before the PUT_ALL operation are released; those acquired in operations appearing after the PUT_ALL operation are not released.


PUT_OBJ

public static final LockOperation PUT_OBJ
All locks held on obj are released. The locker parameter and the lock and mode fields are ignored. Locks acquired in operations performed by the current call to Environment.lockVector that appear before the PUT_OBJ operation operation are released; those acquired in operations appearing after the PUT_OBJ operation are not released.


TIMEOUT

public static final LockOperation TIMEOUT
Cause the specified locker to timeout immediately. If the database environment has not configured automatic deadlock detection, the transaction will timeout the next time deadlock detection is performed. As transactions acquire locks on behalf of a single locker ID, timing out the locker ID associated with a transaction will time out the transaction itself.

Method Detail

toString

public String toString()

Overrides:
toString in class Object

Berkeley DB
version 5.3.21

Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.