Class AlertStatus

java.lang.Object
org.openspaces.admin.alert.AlertStatus
All Implemented Interfaces:
Serializable

public class AlertStatus extends Object implements Serializable
The alert status levels.

The levels in descending order are:

  • ESCALATED (highest value)
  • RAISED
  • SUPPRESSED
  • RESOLVED
  • NA (lowest value)
Since:
8.0
Author:
Moran Avigdor
See Also:
  • Field Details

    • ESCALATED

      public static final AlertStatus ESCALATED
      ESCALATED is an alert status indicating that a raised alert has been escalated.

      ESCALATED alert status is intended to inform of a situation that is in need of attention, and has gone worse.

      This status is initialized to 1000.

    • RAISED

      public static final AlertStatus RAISED
      RAISED is an alert status indicating an alert has been raised.

      RAISED alerts are intended to inform of a situation that is in need of attention.

      This status is initialized to 900.

    • SUPPRESSED

      public static final AlertStatus SUPPRESSED
      SUPPRESSED is an alert status indicating that a raised alert has been suppressed.

      SUPPRESSED alert status is intended to inform of a situation that has been attended, but will not be resolved.

      This status is initialized to 800.

    • RESOLVED

      public static final AlertStatus RESOLVED
      RESOLVED is an alert status indicating that a raised alert has been resolved.

      RESOLVED alert status is intended to inform of a situation that has been attended and has been resolved.

      This status is initialized to 700.

    • NA

      public static final AlertStatus NA
      NA is an alert status indicating that a component for which an alert has been raised is no longer available.

      NA (NOT AVAILABLE) alert status is intended to inform of a situation that is in need of attention, but it's status can't be currently determined. This alert status can be considered as a 'resolution' depending on the system involved.

      This status is initialized to 600.

  • Constructor Details

    • AlertStatus

      protected AlertStatus(String name, int value)
      Create a named alert status with a given integer value.

      Note that this constructor is "protected" to allow subclassing. In general it is sufficient to use one of the constant Level objects such as RESOLVED or RAISED. However, if there is a need to add a new alert status, this call may be subclassed and new constants can be defined.

      Parameters:
      name - the name of the alert status, for example "RAISED".
      value - an integer value for the status.
  • Method Details

    • getName

      public String getName()
      Return the string name of the alert status.
      Returns:
      name of this alert status.
    • getValue

      public int getValue()
      Get the integer value for this alert status. This integer value can be used for efficient ordering comparisons between alert status objects.
      Returns:
      the integer value for this alert status.
    • isEscalated

      public boolean isEscalated()
      Returns:
      true if this is an ESCALATED alert status.
    • isRaised

      public boolean isRaised()
      Returns:
      true if this is a RAISED alert status.
    • isSuppressed

      public boolean isSuppressed()
      Returns:
      true if this is a SUPPRESSED alert status.
    • isResolved

      public boolean isResolved()
      Returns:
      true if this is a RESOLVED alert status.
    • isUnresolved

      public boolean isUnresolved()
      Returns:
      true if this is *not* a RESOLVED alert status; e.g. SUPPRESSED, RAISED, or ESCALATED
      Since:
      12.0.0
    • isNotAvailable

      public boolean isNotAvailable()
      Returns:
      true if this is a NA alert status.
    • parse

      public static AlertStatus parse(String name)
      Returns an AlertStatus by it's value (see getName()).
      Parameters:
      name - representing this status
      Returns:
      a severity.
      Throws:
      IllegalArgumentException - if an unknown status was requested.
    • parse

      public static AlertStatus parse(int value)
      Returns an AlertStatus by it's value (see getValue()).
      Parameters:
      value - representing this status
      Returns:
      a severity.
      Throws:
      IllegalArgumentException - if an unknown status was requested.
    • equals

      public boolean equals(Object obj)
      Compare two objects for value equality.
      Overrides:
      equals in class Object
      Returns:
      true if and only if the two objects have the same alert status value.
    • hashCode

      public int hashCode()
      Generate a hashcode.
      Overrides:
      hashCode in class Object
      Returns:
      a hashcode based on the alert status value
    • toString

      public final String toString()
      Overrides:
      toString in class Object
      Returns:
      the non-localized name of the alert status, for example "RESOLVED".