Class TimeViolationError

java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
com.igormaznitsa.meta.common.exceptions.TimeViolationError
All Implemented Interfaces:
Serializable

public class TimeViolationError extends AssertionError
The Error shows that some time bounds violation detected during execution.
Since:
1.0
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • detectedTimeInMilliseconds

      private final long detectedTimeInMilliseconds
    • item

      private final TimeGuard.TimeData item
  • Constructor Details

    • 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 Details

    • 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