com.sleepycat.db
Class DbLockNotGrantedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sleepycat.db.DbException
              extended by com.sleepycat.db.DbLockNotGrantedException
All Implemented Interfaces:
java.io.Serializable

public class DbLockNotGrantedException
extends DbException

This information describes the DbLockNotGrantedException class and how it is used by the various Db* classes.

A DbLockNotGrantedException is thrown when a lock, requested using the DbEnv.lockGet or DbEnv.lockVector methods, where the Db.DB_LOCK_NOWAIT option was specified, is unable to be granted immediately.

See Also:
Serialized Form

Constructor Summary
protected DbLockNotGrantedException(java.lang.String message, int op, int mode, Dbt obj, DbLock lock, int index, DbEnv dbenv)
          Constructor for the DbLockNotGrantedException object
 
Method Summary
 int get_index()
          Deprecated. As of Berkeley DB 4.2, replaced by getIndex()
 DbLock get_lock()
          Deprecated. As of Berkeley DB 4.2, replaced by getLock()
 int get_mode()
          Deprecated. As of Berkeley DB 4.2, replaced by getMode()
 Dbt get_obj()
          Deprecated. As of Berkeley DB 4.2, replaced by getObj()
 int get_op()
          Deprecated. As of Berkeley DB 4.2, replaced by getOp()
 int getIndex()
          The getIndex method returns -1 when DbEnv.lockGet was called, and returns the index of the failed DbLockRequest when DbEnv.lockVector was called.
 DbLock getLock()
          The getLock method returns null when DbEnv.lockGet was called, and returns the lock in the failed DbLockRequest when DbEnv.lockVector was called.
 int getMode()
          The getMode method returns the mode parameter when DbEnv.lockGet was called, and returns the mode for the failed DbLockRequest when DbEnv.lockVector was called.
 Dbt getObj()
          The getObj method returns the mode parameter when returns the object parameter when DbEnv.lockGet was called, and returns the object for the failed DbLockRequest when DbEnv.lockVector was called.
 int getOp()
          The getOp method returns 0 when DbEnv.lockGet was called, and returns the op for the failed DbLockRequest when DbEnv.lockVector was called.
 
Methods inherited from class com.sleepycat.db.DbException
get_errno, getDbEnv, getErrno, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DbLockNotGrantedException

protected DbLockNotGrantedException(java.lang.String message,
                                    int op,
                                    int mode,
                                    Dbt obj,
                                    DbLock lock,
                                    int index,
                                    DbEnv dbenv)
Constructor for the DbLockNotGrantedException object

Parameters:
message - A description of the error
op - The operation of the failed lock request
mode - The mode of the failed lock request
obj - The object of the failed lock request
lock - The lock of the failed lock request (lockVector only)
index - The index of the failed lock request (lockVector only)
dbenv - The database environment where the exception occurred.
Method Detail

getIndex

public int getIndex()
The getIndex method returns -1 when DbEnv.lockGet was called, and returns the index of the failed DbLockRequest when DbEnv.lockVector was called.

Returns:
The getIndex method returns -1 when DbEnv.lockGet was called, and returns the index of the failed DbLockRequest when DbEnv.lockVector was called.


getLock

public DbLock getLock()
The getLock method returns null when DbEnv.lockGet was called, and returns the lock in the failed DbLockRequest when DbEnv.lockVector was called.

Returns:
The getLock method returns null when DbEnv.lockGet was called, and returns the lock in the failed DbLockRequest when DbEnv.lockVector was called.


getMode

public int getMode()
The getMode method returns the mode parameter when DbEnv.lockGet was called, and returns the mode for the failed DbLockRequest when DbEnv.lockVector was called.

Returns:
The getMode method returns the mode parameter when DbEnv.lockGet was called, and returns the mode for the failed DbLockRequest when DbEnv.lockVector was called.


getObj

public Dbt getObj()
The getObj method returns the mode parameter when returns the object parameter when DbEnv.lockGet was called, and returns the object for the failed DbLockRequest when DbEnv.lockVector was called.

Returns:
The getObj method returns the mode parameter when returns the object parameter when DbEnv.lockGet was called, and returns the object for the failed DbLockRequest when DbEnv.lockVector was called.


getOp

public int getOp()
The getOp method returns 0 when DbEnv.lockGet was called, and returns the op for the failed DbLockRequest when DbEnv.lockVector was called.

Returns:
The getOp method returns 0 when DbEnv.lockGet was called, and returns the op for the failed DbLockRequest when DbEnv.lockVector was called.


get_index

public int get_index()
Deprecated. As of Berkeley DB 4.2, replaced by getIndex()

Returns:
Description of the Return Value

get_lock

public DbLock get_lock()
Deprecated. As of Berkeley DB 4.2, replaced by getLock()

Returns:
Description of the Return Value

get_mode

public int get_mode()
Deprecated. As of Berkeley DB 4.2, replaced by getMode()

Returns:
Description of the Return Value

get_obj

public Dbt get_obj()
Deprecated. As of Berkeley DB 4.2, replaced by getObj()

Returns:
Description of the Return Value

get_op

public int get_op()
Deprecated. As of Berkeley DB 4.2, replaced by getOp()

Returns:
Description of the Return Value