|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.vutbr.fit.atomicity.AtomicityCollection
public class AtomicityCollection
This class contains a collection of atomicity sections indexed by programLocation of the begining access to the atomicity. It implements import from and export to XML files and several basic operation on the colleciton.
Atomicity
,
RaceDetector
Nested Class Summary | |
---|---|
(package private) class |
AtomicityCollection.XMLHandler
A class implements the handler for processing an XML file. |
Field Summary | |
---|---|
boolean |
correctRun
|
Constructor Summary | |
---|---|
AtomicityCollection()
Constructor. |
Method Summary | |
---|---|
void |
addAll(AtomicityCollection ac)
Add a new atomicity to the collection. |
void |
addAtomicity(java.lang.String progLoc,
Atomicity atom)
Add a new atomicity to the collection. |
Atomicity |
getAtomicity(java.lang.String programLocation)
Returns Atomicity object pointed at the given programLocation. |
int |
getAtomicityCollectionSize()
Returns the number of atomicities present in this collection. |
java.lang.String |
getDebugText()
Returns text representation - used for debuging. |
java.util.HashSet<java.lang.String> |
getKeySet()
Returns the key set of the atomsec. |
static Atomicity |
getNewAtomicity(Access begin,
java.util.HashSet<Access> ends)
Returns the right Atomicity object according to the number of ends the atomicity should have. |
void |
remove(java.lang.String key)
Removes from this atomicity collection the record that is determined by its key. |
void |
removeAll(AtomicityCollection remCollection)
Removes from this atomicity collection all records that are presented in the given atomicity collection. |
void |
removeAll(java.util.HashSet<java.lang.String> remCollection)
Removes from this atomicity collection all records that uses as key ConTest locations present in the given Set. |
boolean |
restoreAtomicityFromFile(java.io.BufferedReader fd)
Restores atomicity information from the file. |
void |
storeAtomicityToFile(java.io.BufferedWriter fd,
boolean learning)
Stores atomicity information into the "atomicity" directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public volatile boolean correctRun
Constructor Detail |
---|
public AtomicityCollection()
Method Detail |
---|
public Atomicity getAtomicity(java.lang.String programLocation)
programLocation
-
public void addAtomicity(java.lang.String progLoc, Atomicity atom)
public void addAll(AtomicityCollection ac)
public void storeAtomicityToFile(java.io.BufferedWriter fd, boolean learning)
learning
- If true statistics of violation will be storedpublic boolean restoreAtomicityFromFile(java.io.BufferedReader fd)
public void remove(java.lang.String key)
key
- public void removeAll(AtomicityCollection remCollection)
remCollection
- public void removeAll(java.util.HashSet<java.lang.String> remCollection)
remCollection
- public int getAtomicityCollectionSize()
public java.lang.String getDebugText()
public java.util.HashSet<java.lang.String> getKeySet()
public static Atomicity getNewAtomicity(Access begin, java.util.HashSet<Access> ends)
begin
- ends
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |