Package com.sleepycat.db
Class LockOperation
java.lang.Object
com.sleepycat.db.LockOperation
Operations that can be performed on locks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LockOperationGet the lock defined by the values of the mode and obj fields, for the specified locker.static final LockOperationIdentical to LockOperation GET except that the value in the timeout field overrides any previously specified timeout value for this lock.static final LockOperationThe lock to which the lock field refers is released.static final LockOperationAll locks held by the specified locker are released.static final LockOperationAll locks held on obj are released.static final LockOperationCause the specified locker to timeout immediately. -
Method Summary
-
Field Details
-
GET
Get the lock defined by the values of the mode and obj fields, for the specified locker. Upon return fromEnvironment.lockVector, if the lock field is non-null, a reference to the acquired lock is stored there. (This reference is invalidated by any call toEnvironment.lockVectororEnvironment.putLockthat releases the lock.) -
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
The lock to which the lock field refers is released. The locker, mode and obj fields are ignored. -
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 toEnvironment.lockVectorwhich appear before the PUT_ALL operation are released; those acquired in operations appearing after the PUT_ALL operation are not released. -
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 toEnvironment.lockVectorthat appear before the PUT_OBJ operation operation are released; those acquired in operations appearing after the PUT_OBJ operation are not released. -
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 Details