cz.vutbr.fit.racedetector
Class ERThreadInfo

java.lang.Object
  extended by cz.vutbr.fit.racedetector.ERThreadInfo

 class ERThreadInfo
extends java.lang.Object

This class is used for keeping information about threads accessing concrete variable. The data are used for understandable reporting of bugs.

Author:
Zdenek Letko

Constructor Summary
ERThreadInfo(java.lang.String programLocation, RaceDetector.Operation mode)
          constructor
 
Method Summary
 void addThreadCandidateLocks(java.util.Set<javolution.util.Index> locks)
          Adds set of locks that are used in the combination of thread/variable.
 Access getAtomAccess()
          Returns string of program location where the last access to the variable took place and the access mode.
 java.util.Set<javolution.util.Index> getThreadCandidateLocks()
          Returns a shapshot candidate lock set of the thread with this variable.
 void retainThreadCandidateLocks(java.util.Set<javolution.util.Index> locks)
          Retains maintained candidates locks for thread/variable combination.
 void updateThreadInfo(java.lang.String programLocation, RaceDetector.Operation mode)
          Updates programLocation and access mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERThreadInfo

public ERThreadInfo(java.lang.String programLocation,
                    RaceDetector.Operation mode)
constructor

Parameters:
programLocation -
mode - Access mode of the variable according to RaceDetector.READ/WRITE_OPER
Method Detail

addThreadCandidateLocks

public void addThreadCandidateLocks(java.util.Set<javolution.util.Index> locks)
Adds set of locks that are used in the combination of thread/variable.

Parameters:
locks -

retainThreadCandidateLocks

public void retainThreadCandidateLocks(java.util.Set<javolution.util.Index> locks)
Retains maintained candidates locks for thread/variable combination.

Parameters:
locks -

updateThreadInfo

public void updateThreadInfo(java.lang.String programLocation,
                             RaceDetector.Operation mode)
Updates programLocation and access mode. Program location is set to the last access. Mode switch to write if mode is write.

Parameters:
programLocation -
mode -

getAtomAccess

public Access getAtomAccess()
Returns string of program location where the last access to the variable took place and the access mode.


getThreadCandidateLocks

public java.util.Set<javolution.util.Index> getThreadCandidateLocks()
Returns a shapshot candidate lock set of the thread with this variable.