cz.vutbr.fit.atomicity
Class AtomicityMulti

java.lang.Object
  extended by cz.vutbr.fit.atomicity.AtomicityMulti
All Implemented Interfaces:
Atomicity

public class AtomicityMulti
extends java.lang.Object
implements Atomicity

The representation of an atomicity which as more than three ends.

Author:
zdenek

Field Summary
 Access atomBegin
           
 
Constructor Summary
AtomicityMulti(Access aBegin, java.util.HashSet<Access> aEnd)
          Constructor gets a set of ends of the atomicity.
 
Method Summary
 void genXML(javax.xml.transform.sax.TransformerHandler hd, boolean learning)
          Generates an XML record of this atomicity.
 Access[] getAtomEnds()
          Returns the array of ending Accesses.
 RaceDetector.Operation getBeginOp()
          Returns the access type (read/write of the atomicity begin operation.
 java.lang.String getKeyProgLocation()
          Returns ConTest program location of the begin access of this atomicity.
 void incViolation()
          This method will safely increment tne counter of this atomicity violation - this value is used during the learning stage.
 RaceDetector.Operation isEnd(java.lang.String progLocation)
          Returns true if the given program location represents the end of the atomicity.
 java.lang.String toString()
          Returns the string representation of this atomicity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

atomBegin

public final Access atomBegin
Constructor Detail

AtomicityMulti

public AtomicityMulti(Access aBegin,
                      java.util.HashSet<Access> aEnd)
Constructor gets a set of ends of the atomicity.

Parameters:
aEnd -
Method Detail

getBeginOp

public RaceDetector.Operation getBeginOp()
Returns the access type (read/write of the atomicity begin operation.

Specified by:
getBeginOp in interface Atomicity
Returns:
access type

getKeyProgLocation

public java.lang.String getKeyProgLocation()
Returns ConTest program location of the begin access of this atomicity.

Specified by:
getKeyProgLocation in interface Atomicity
Returns:
program location

getAtomEnds

public Access[] getAtomEnds()
Returns the array of ending Accesses.

Specified by:
getAtomEnds in interface Atomicity

incViolation

public void incViolation()
This method will safely increment tne counter of this atomicity violation - this value is used during the learning stage.

Specified by:
incViolation in interface Atomicity

isEnd

public RaceDetector.Operation isEnd(java.lang.String progLocation)
Returns true if the given program location represents the end of the atomicity. (According to atomicity.dtd)

Specified by:
isEnd in interface Atomicity
Parameters:
progLocation - ConTest program location.

genXML

public void genXML(javax.xml.transform.sax.TransformerHandler hd,
                   boolean learning)
            throws org.xml.sax.SAXException
Generates an XML record of this atomicity.

Specified by:
genXML in interface Atomicity
learning - True if the violation count should be also written
Throws:
org.xml.sax.SAXException

toString

public java.lang.String toString()
Returns the string representation of this atomicity.

Specified by:
toString in interface Atomicity
Overrides:
toString in class java.lang.Object