com.sleepycat.je
Class DeadlockException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sleepycat.je.DatabaseException
              extended by com.sleepycat.je.DeadlockException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LockNotGrantedException

public class DeadlockException
extends DatabaseException

DeadlockException is thrown to a thread of control when multiple threads competing for a lock are deadlocked or when a lock request would need to block and the transaction has been configured to not wait for locks. The exception carrys two arrays of transaction ids, one of the owners and the other of the waiters, at the time of the timeout.

See Also:
Serialized Form

Constructor Summary
DeadlockException()
           
DeadlockException(java.lang.String message)
           
DeadlockException(java.lang.String message, java.lang.Throwable t)
           
DeadlockException(java.lang.Throwable t)
           
 
Method Summary
 long[] getOwnerTxnIds()
          Returns an array of longs containing transaction ids of owners at the the time of the timeout.
 long getTimeoutMillis()
           
 long[] getWaiterTxnIds()
          Returns an array of longs containing transaction ids of waiters at the the time of the timeout.
 void setOwnerTxnIds(long[] ownerTxnIds)
           
 void setTimeoutMillis(long timeoutMillis)
           
 void setWaiterTxnIds(long[] waiterTxnIds)
           
 
Methods inherited from class com.sleepycat.je.DatabaseException
getVersionHeader
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

DeadlockException

public DeadlockException()

DeadlockException

public DeadlockException(java.lang.Throwable t)

DeadlockException

public DeadlockException(java.lang.String message)

DeadlockException

public DeadlockException(java.lang.String message,
                         java.lang.Throwable t)
Method Detail

setOwnerTxnIds

public void setOwnerTxnIds(long[] ownerTxnIds)

getOwnerTxnIds

public long[] getOwnerTxnIds()
Returns an array of longs containing transaction ids of owners at the the time of the timeout.

Returns:
an array of longs containing transaction ids of owners at the the time of the timeout.

setWaiterTxnIds

public void setWaiterTxnIds(long[] waiterTxnIds)

getWaiterTxnIds

public long[] getWaiterTxnIds()
Returns an array of longs containing transaction ids of waiters at the the time of the timeout.

Returns:
an array of longs containing transaction ids of waiters at the the time of the timeout.

setTimeoutMillis

public void setTimeoutMillis(long timeoutMillis)

getTimeoutMillis

public long getTimeoutMillis()