Interface CriticalComponent
- All Known Subinterfaces:
Queue
- All Known Implementing Classes:
AbstractJournalStorageManager,CriticalComponentImpl,JDBCJournalStorageManager,JournalStorageManager,LastValueQueue,QueueImpl,TimedBuffer
public interface CriticalComponent
A Critical component enters and leaves a critical state. You update a long every time you enter a critical path you
update a different long with a System.nanoTime every time you leave that path.
If the enterCritical > leaveCritical at any point, then you need to measure the timeout. if the system stops responding, then you have something irresponsive at the system.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckExpiration(long timeout, boolean reset) Check if the component is expired at a given timeout.. on any of its paths.measureCritical(int path)
-
Method Details
-
getCriticalAnalyzer
CriticalAnalyzer getCriticalAnalyzer() -
measureCritical
-
checkExpiration
boolean checkExpiration(long timeout, boolean reset) Check if the component is expired at a given timeout.. on any of its paths.- 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
-