GigaSpaces XAP 9.7.2 API

org.openspaces.admin.alert
Class AlertStatus

java.lang.Object
  extended by 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:

Since:
8.0
Author:
Moran Avigdor
See Also:
Serialized Form

Field Summary
static AlertStatus ESCALATED
          ESCALATED is an alert status indicating that a raised alert has been escalated.
static AlertStatus NA
          NA is an alert status indicating that a component for which an alert has been raised is no longer available.
static AlertStatus RAISED
          RAISED is an alert status indicating an alert has been raised.
static AlertStatus RESOLVED
          RESOLVED is an alert status indicating that a raised alert has been resolved.
static AlertStatus SUPPRESSED
          SUPPRESSED is an alert status indicating that a raised alert has been suppressed.
 
Constructor Summary
protected AlertStatus(String name, int value)
          Create a named alert status with a given integer value.
 
Method Summary
 boolean equals(Object obj)
          Compare two objects for value equality.
 String getName()
          Return the string name of the alert status.
 int getValue()
          Get the integer value for this alert status.
 int hashCode()
          Generate a hashcode.
 boolean isEscalated()
           
 boolean isNotAvailable()
           
 boolean isRaised()
           
 boolean isResolved()
           
 boolean isSuppressed()
           
static AlertStatus parse(int value)
          Returns an AlertStatus by it's value (see getValue()).
static AlertStatus parse(String name)
          Returns an AlertStatus by it's value (see getName()).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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 Detail

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 Detail

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.

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".

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.