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 CriticalComponentpublic void enterCritical(int path)
CriticalComponententerCritical in interface CriticalComponentpublic void leaveCritical(int path)
CriticalComponentleaveCritical in interface CriticalComponentpublic boolean checkExpiration(long timeout,
boolean reset)
CriticalComponentcheckExpiration in interface CriticalComponenttimeout - - the timeout to check if the component is expiredreset - - true to reset the component timer if it is expiredCopyright © 2020 The Apache Software Foundation. All Rights Reserved.