public class CriticalComponentImpl extends Object implements CriticalComponent
Constructor and Description |
---|
CriticalComponentImpl(CriticalAnalyzer analyzer,
int numberOfPaths) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkExpiration(long timeout,
boolean reset)
Check if the component is expired at a given timeout..
|
void |
enterCritical(int path)
please save the time you entered here.
|
CriticalAnalyzer |
getCriticalAnalyzer() |
void |
leaveCritical(int path)
please save the time you entered here
Use volatile variables.
|
public CriticalComponentImpl(CriticalAnalyzer analyzer, int numberOfPaths)
public CriticalAnalyzer getCriticalAnalyzer()
getCriticalAnalyzer
in interface CriticalComponent
public void enterCritical(int path)
CriticalComponent
enterCritical
in interface CriticalComponent
public void leaveCritical(int path)
CriticalComponent
leaveCritical
in interface CriticalComponent
public boolean checkExpiration(long timeout, boolean reset)
CriticalComponent
checkExpiration
in interface CriticalComponent
timeout
- - the timeout to check if the component is expiredreset
- - true to reset the component timer if it is expiredCopyright © 2021 JBoss by Red Hat. All rights reserved.