com.sleepycat.je.txn
Class LockType

java.lang.Object
  extended by com.sleepycat.je.txn.LockType

public class LockType
extends java.lang.Object

LockType is a type safe enumeration of all lock types. Methods on LockType objects can be used to determine whether a type conflicts with another type or can be upgraded to another type.


Field Summary
static LockType NONE
          NONE is used for requesting a dirty read and does not appear in the conflict or upgrade matrices.
static LockType RANGE_INSERT
           
static LockType RANGE_READ
           
static LockType RANGE_WRITE
           
static LockType READ
          Lock types.
static LockType RESTART
          RESTART is used for waiting for a restart and does not appear in the conflict or upgrade matrices.
static LockType WRITE
           
 
Method Summary
 boolean isWriteLock()
          Returns true if this is a WRITE or RANGE_WRITE lock.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READ

public static final LockType READ
Lock types. Indexes must be kept manually synchronized in the matrixes below.


WRITE

public static final LockType WRITE

RANGE_READ

public static final LockType RANGE_READ

RANGE_WRITE

public static final LockType RANGE_WRITE

RANGE_INSERT

public static final LockType RANGE_INSERT

NONE

public static final LockType NONE
NONE is used for requesting a dirty read and does not appear in the conflict or upgrade matrices.


RESTART

public static final LockType RESTART
RESTART is used for waiting for a restart and does not appear in the conflict or upgrade matrices.

Method Detail

isWriteLock

public final boolean isWriteLock()
Returns true if this is a WRITE or RANGE_WRITE lock. For RANGE_INSERT, false is returned because RANGE_INSERT is used to lock the key following the insertion key, not the insertion key itself.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object