Berkeley DB Java Edition
version 1.5.1

com.sleepycat.je
Class LockMode

java.lang.Object
  |
  +--com.sleepycat.je.LockMode

public class LockMode
extends Object

Locking modes for database operations. Locking modes are required parameters for operations that retrieve data or modify the database.


Field Summary
static LockMode DEFAULT
          Acquire read locks for read operations and write locks for write operations.
static LockMode DIRTY_READ
          Read modified but not yet committed data.
static LockMode RMW
          Acquire write locks instead of read locks when doing the retrieval.
 
Method Summary
 String toString()
          Provide a string representation of the enumeration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final LockMode DEFAULT
Acquire read locks for read operations and write locks for write operations.


DIRTY_READ

public static final LockMode DIRTY_READ
Read modified but not yet committed data.


RMW

public static final LockMode RMW
Acquire write locks instead of read locks when doing the retrieval. Setting this flag can eliminate deadlock during a read-modify-write cycle by acquiring the write lock during the read part of the cycle so that another thread of control acquiring a read lock for the same item, in its own read-modify-write cycle, will not result in deadlock.

Method Detail

toString

public String toString()
Provide a string representation of the enumeration.

Overrides:
toString in class Object

Berkeley DB Java Edition
version 1.5.1

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.