|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.vutbr.fit.healing.Healing
public abstract class Healing
Abstract class defines the interface for healing methods implemented in Healing* classes. It also provides a way to set used healing method by getHealingMethod and can distuingish between normal access to the variable and enter/leave the critical section (also called atomic section) according to the information received from the Atomicity object.
Atomicity
Constructor Summary | |
---|---|
Healing()
|
Method Summary | |
---|---|
protected abstract void |
afterNormalAccess(RDVariable rdv,
RDThread rdt)
Called after normal access to the variable. |
protected abstract void |
beforeNormalAccess(RDVariable rdv,
RDThread rdt)
Called before normal access to the variable. |
void |
endHealing(java.lang.String programLocation,
RDVariable rdv,
RDThread rdt)
End healing if needed by chosen healing method. |
protected abstract void |
enterCriticSection(RDVariable rdv,
RDThread rdt)
Called before enter the critical section which should be atomic. |
static void |
finalHealing()
finalization of the method - empty by default |
static Healing |
getHealingMethod()
Returns a new object representing concrete healing method which will be used for healing (quarding atomicity sections). |
static void |
initHealing()
initialization of the method - empty by default |
boolean |
isHealedVariable(RDVariable rdv)
Returns true if the given variable is healed by this thread. |
protected abstract void |
leaveCriticSection(RDVariable rdv,
RDThread rdt)
Called after exit the critical section which should be atomic. |
void |
startHealing(java.lang.String programLocation,
RDVariable rdv,
RDThread rdt,
Atomicity atom)
Start healing operation if needed according to chosen healing method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Healing()
Method Detail |
---|
public boolean isHealedVariable(RDVariable rdv)
public static Healing getHealingMethod()
public static void initHealing()
public static void finalHealing()
public void startHealing(java.lang.String programLocation, RDVariable rdv, RDThread rdt, Atomicity atom)
programLocation
- Program locationrdv
- Variable informationrdt
- Thread informationatom
- Atomicity information - not null if start of atomic sectionpublic void endHealing(java.lang.String programLocation, RDVariable rdv, RDThread rdt)
programLocation
- Program locationrdv
- Variable informationrdt
- Thread informationprotected abstract void enterCriticSection(RDVariable rdv, RDThread rdt)
rdv
- Variable informationprotected abstract void leaveCriticSection(RDVariable rdv, RDThread rdt)
rdv
- Variable informationprotected abstract void beforeNormalAccess(RDVariable rdv, RDThread rdt)
rdv
- Variable informationprotected abstract void afterNormalAccess(RDVariable rdv, RDThread rdt)
rdv
- Variable information
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |