com.sleepycat.je.txn
Class LockConflict

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

 class LockConflict
extends Object

LockConflict is a type safe enumeration of lock conflict types. Methods on LockConflict objects are used to determine whether a conflict exists and, if so, how it should be handled.


Field Summary
(package private) static LockConflict ALLOW
           
(package private) static LockConflict BLOCK
           
(package private) static LockConflict RESTART
           
 
Method Summary
(package private)  boolean getAllowed()
          This method is called first to determine whether the locks is allowed.
(package private)  boolean getRestart()
          This method is called when getAllowed returns false to determine whether an exception should be thrown to cause the requester's operation to be restarted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW

static final LockConflict ALLOW

BLOCK

static final LockConflict BLOCK

RESTART

static final LockConflict RESTART
Method Detail

getAllowed

boolean getAllowed()
This method is called first to determine whether the locks is allowed. If true, there is no conflict. If false, there is a conflict and the requester must wait for or be denied the lock, or (if getRestart returns true) an exception should be thrown to cause the requester's operation to be restarted.


getRestart

boolean getRestart()
This method is called when getAllowed returns false to determine whether an exception should be thrown to cause the requester's operation to be restarted. If getAllowed returns false and this method returns false, the requester should wait for or be denied the lock, depending on the request mode. If getAllowed returns true, this method will always return false.



Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.