com.sleepycat.je
Class LockNotAvailableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sleepycat.je.DatabaseException
                  extended by com.sleepycat.je.OperationFailureException
                      extended by com.sleepycat.je.LockConflictException
                          extended by com.sleepycat.je.LockNotAvailableException
All Implemented Interfaces:
Serializable

public class LockNotAvailableException
extends LockConflictException

Thrown when a non-blocking operation fails to get a lock. Non-blocking transactions are configured using TransactionConfig.setNoWait(boolean).

The Transaction handle is not invalidated as a result of this exception.

For compatibility with prior releases, LockNotGrantedException is thrown instead of LockNotAvailableException when EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS is set to true. Currently this configuration parameter is true by default, but the default value will be changed to false in a future release. See EnvironmentConfig.LOCK_OLD_LOCK_EXCEPTIONS for information on the changes that should be made to all JE applications.

Normally, applications should catch the base class LockConflictException rather than catching one of its subclasses. All lock conflicts are typically handled in the same way, which is normally to abort and retry the transaction. See LockConflictException for more information.

Since:
4.0
See Also:
Serialized Form

Constructor Summary
LockNotAvailableException(Locker locker, String message)
          For internal use only.
 
Method Summary
 OperationFailureException wrapSelf(String msg)
          For internal use only.
 
Methods inherited from class com.sleepycat.je.LockConflictException
getOwnerTxnIds, getTimeoutMillis, getWaiterTxnIds, setOwnerTxnIds, setTimeoutMillis, setWaiterTxnIds
 
Methods inherited from class com.sleepycat.je.DatabaseException
addErrorMessage, getMessage, getVersionHeader
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockNotAvailableException

public LockNotAvailableException(Locker locker,
                                 String message)
For internal use only.

Method Detail

wrapSelf

public OperationFailureException wrapSelf(String msg)
For internal use only.

Specified by:
wrapSelf in class OperationFailureException


Copyright (c) 2004-2010 Oracle. All rights reserved.