GigaSpaces XAP 9.7.2 API

org.openspaces.admin.alert
Class AlertSeverity

java.lang.Object
  extended by org.openspaces.admin.alert.AlertSeverity
All Implemented Interfaces:
Serializable

public class AlertSeverity
extends Object
implements Serializable

The alert severity levels.

The levels in descending order are:

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

Field Summary
static AlertSeverity INFO
          INFO is an alert severity indicating an informational alert.
static AlertSeverity SEVERE
          SEVERE is an alert severity indicating a serious failure/situation.
static AlertSeverity WARNING
          WARNING is an alert severity indicating a potential problem.
 
Constructor Summary
protected AlertSeverity(String name, int value)
          Create a named alert severity 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 severity.
 int getValue()
          Get the integer value for this alert severity.
 int hashCode()
          Generate a hashcode.
 boolean isInfo()
           
 boolean isSevere()
           
 boolean isWarning()
           
static AlertSeverity parse(int value)
          Returns an AlertSeverity by it's value (see getValue()).
static AlertSeverity parse(String name)
          Returns an AlertSeverity by it's name (see getName()).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEVERE

public static final AlertSeverity SEVERE
SEVERE is an alert severity indicating a serious failure/situation.

SEVERE alerts should describe events that are of considerable importance and which will prevent normal program execution. They should be reasonably intelligible to end users and to system administrators.

This severity is initialized to 1000.


WARNING

public static final AlertSeverity WARNING
WARNING is an alert severity indicating a potential problem.

WARNING alerts should describe events that will be of interest to end users or system managers, or which indicate potential problems.

This severity is initialized to 900.


INFO

public static final AlertSeverity INFO
INFO is an alert severity indicating an informational alert.

INFO severity will typically be used when 'resolving' an alert, for which it's previous severity is either unknown or unimportant.

This severity is initialized to 800.

Constructor Detail

AlertSeverity

protected AlertSeverity(String name,
                        int value)
Create a named alert severity 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 WARNING or SEVERE. However, if there is a need to add a new alert severity, this call may be subclassed and new constants can be defined.

Parameters:
name - the name of the alert severity, for example "SEVERE".
value - an integer value for the severity.
Method Detail

getName

public String getName()
Return the string name of the alert severity.

Returns:
name of this alert severity.

getValue

public int getValue()
Get the integer value for this alert severity. This integer value can be used for efficient ordering comparisons between alert severity objects.

Returns:
the integer value for this alert severity.

isSevere

public boolean isSevere()
Returns:
true if this is a SEVERE alert severity.

isWarning

public boolean isWarning()
Returns:
true if this is a WARNING alert severity.

isInfo

public boolean isInfo()
Returns:
true if this is an INFO alert severity.

parse

public static AlertSeverity parse(String name)
Returns an AlertSeverity by it's name (see getName()).

Parameters:
name - representing this severity.
Returns:
a severity.
Throws:
IllegalArgumentException - if an unknown severity was requested.

parse

public static AlertSeverity parse(int value)
Returns an AlertSeverity by it's value (see getValue()).

Parameters:
value - representing this severity.
Returns:
a severity.
Throws:
IllegalArgumentException - if an unknown severity 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 severity value.

hashCode

public int hashCode()
Generate a hashcode.

Overrides:
hashCode in class Object
Returns:
a hashcode based on the alert severity value

toString

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

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.