com.sleepycat.je.txn
Class LockInfo

java.lang.Object
  extended by com.sleepycat.je.txn.LockInfo
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ThinLockImpl

public class LockInfo
extends Object
implements Cloneable

LockInfo is a class that embodies information about a lock instance. The holding thread and the locktype are all contained in the object. This class is public for unit tests.


Field Summary
protected  Locker locker
           
protected  LockType lockType
           
 
Constructor Summary
LockInfo(Locker locker, LockType lockType)
          Construct a new LockInfo.
LockInfo(LockInfo other)
          Clone from given LockInfo.
 
Method Summary
 Object clone()
           
 void dump()
          Debugging
static boolean getDeadlockStackTrace()
          For unit testing only.
(package private)  Locker getLocker()
           
(package private)  LockType getLockType()
           
(package private) static void setDeadlockStackTrace(boolean enable)
          Called when the je.txn.deadlockStackTrace property is changed.
(package private)  void setLocker(Locker locker)
          Change this lockInfo over to the prescribed locker.
(package private)  void setLockType(LockType lockType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

locker

protected Locker locker

lockType

protected LockType lockType
Constructor Detail

LockInfo

public LockInfo(Locker locker,
                LockType lockType)
Construct a new LockInfo. public for Sizeof program.


LockInfo

LockInfo(LockInfo other)
Clone from given LockInfo. Use this constructor when copying a LockInfo and its identity should be copied (e.g., when mutating a thin lock to a thick lock) to ensure that debugging info is retained.

Method Detail

setDeadlockStackTrace

static void setDeadlockStackTrace(boolean enable)
Called when the je.txn.deadlockStackTrace property is changed.


getDeadlockStackTrace

public static boolean getDeadlockStackTrace()
For unit testing only.


setLocker

void setLocker(Locker locker)
Change this lockInfo over to the prescribed locker.


getLocker

Locker getLocker()
Returns:
The transaction associated with this Lock.

setLockType

void setLockType(LockType lockType)

getLockType

LockType getLockType()
Returns:
The LockType associated with this Lock.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

dump

public void dump()
Debugging


toString

public String toString()
Overrides:
toString in class Object


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