Class FailureNotice

  • All Implemented Interfaces:
    java.lang.Comparable<QObject>, GetNameIfc

    public class FailureNotice
    extends QObject
    A FailureNotice represents a notification that the ResourceUnit should go down due to a failure. The failure notice may be required to be immediate or not. If not immediate, then the failure may be delayed until the resource unit finishes its current activity. A FailureNotice has a well-defined state pattern. When created, the notice is placed in the Created state. From the created state, the notice can become active, delayed, or ignored. If the notice is active, the failure is in progress. After being active, the notice can only become completed. If the notice is delayed, the notice is waiting to become active. After being delayed, the notice can become active or be ignored. If the resource unit ignored the notice, then the notice is placed in the ignored state. The ignored state is terminal. Once the notice finishes being active, it is placed in the completed state. The completed state is terminal. The associated FailureProcess is notified when the notice enters these states. This allows FailureProcesses to react accordingly.
    • Method Detail

      • getResourceUnit

        public final ResourceUnit getResourceUnit()
        Returns:
        the ResourceUnit that the FailureNotice was sent to, or null if not sent
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class QObject
      • getDuration

        public final double getDuration()
        Returns:
        the time that the failure should last
      • getFailureProcess

        public final FailureProcess getFailureProcess()
        Returns:
        the associated FailureProcess
      • isDelayable

        public final boolean isDelayable()
        If the notice can be delayed while resource finishes busy state
        Returns:
        true if the notice can be delayed
      • isCreated

        public final boolean isCreated()
        Returns:
        true if in created state
      • isDelayed

        public final boolean isDelayed()
        Returns:
        true if in delayed state
      • isIgnored

        public final boolean isIgnored()
        Returns:
        true if in ignored state
      • isCompleted

        public final boolean isCompleted()
        Returns:
        true if in completed state
      • isActive

        public final boolean isActive()
        Returns:
        true if in active state