Class TimeViolationError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- java.lang.AssertionError
-
- com.igormaznitsa.meta.common.exceptions.TimeViolationError
-
- All Implemented Interfaces:
java.io.Serializable
public class TimeViolationError extends java.lang.AssertionErrorThe Error shows that some time bounds violation detected during execution.- Since:
- 1.0
- See Also:
TimeGuard, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private longdetectedTimeInMillisecondsprivate TimeGuard.TimeDataitemprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description TimeViolationError(long detectedTimeInMilliseconds, TimeGuard.TimeData item)The Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeGuard.TimeDatagetData()Get the data container which was created during time watcher registration.longgetDetectedTimeInMilliseconds()Get the detected time in milliseconds.longgetDetectedViolationInMilliseconds()Get the difference between the expected max time and the detected time.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
detectedTimeInMilliseconds
private final long detectedTimeInMilliseconds
-
item
private final TimeGuard.TimeData item
-
-
Constructor Detail
-
TimeViolationError
public TimeViolationError(long detectedTimeInMilliseconds, TimeGuard.TimeData item)The Constructor.- Parameters:
detectedTimeInMilliseconds- the detected time in milliseconds.item- the data container contains registration data for time watcher- Since:
- 1.0
-
-
Method Detail
-
getDetectedViolationInMilliseconds
public long getDetectedViolationInMilliseconds()
Get the difference between the expected max time and the detected time.- Returns:
- difference in milliseconds between max time and detected time
- Since:
- 1.0
-
getDetectedTimeInMilliseconds
public long getDetectedTimeInMilliseconds()
Get the detected time in milliseconds.- Returns:
- the detected time in milliseconds
- Since:
- 1.0
-
getData
public TimeGuard.TimeData getData()
Get the data container which was created during time watcher registration.- Returns:
- the data container contains data for time watcher
-
-