Class CriticalComponentImpl
- java.lang.Object
-
- org.apache.activemq.artemis.utils.critical.CriticalComponentImpl
-
- All Implemented Interfaces:
CriticalComponent
public class CriticalComponentImpl extends Object implements CriticalComponent
This is not abstract as it could be used through aggregations or extensions. This is only good for cases where you call leave within the same thread as you called enter.
-
-
Constructor Summary
Constructors Constructor Description CriticalComponentImpl(CriticalAnalyzer analyzer, int numberOfPaths)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckExpiration(long timeout, boolean reset)Check if the component is expired at a given timeout..CriticalAnalyzergetCriticalAnalyzer()CriticalCloseablemeasureCritical(int path)
-
-
-
Constructor Detail
-
CriticalComponentImpl
public CriticalComponentImpl(CriticalAnalyzer analyzer, int numberOfPaths)
-
-
Method Detail
-
getCriticalAnalyzer
public CriticalAnalyzer getCriticalAnalyzer()
- Specified by:
getCriticalAnalyzerin interfaceCriticalComponent
-
measureCritical
public CriticalCloseable measureCritical(int path)
- Specified by:
measureCriticalin interfaceCriticalComponent
-
checkExpiration
public boolean checkExpiration(long timeout, boolean reset)Description copied from interface:CriticalComponentCheck if the component is expired at a given timeout.. on any of its paths.- Specified by:
checkExpirationin interfaceCriticalComponent- Parameters:
timeout- - the timeout to check if the component is expiredreset- - true to reset the component timer if it is expired- Returns:
- -1 if it's ok, or the number of the path it failed
-
-