GigaSpaces XAP 9.7.2 API

org.openspaces.admin.alert
Class AlertFactory

java.lang.Object
  extended by org.openspaces.admin.alert.AlertFactory

public class AlertFactory
extends Object

A factory for constructing an alert instance to be fired by an alert bean.

Since:
8.0
Author:
Moran Avigdor

Constructor Summary
AlertFactory()
          A factory for creating an Alert.
 
Method Summary
 AlertFactory componentDescription(String componentDescription)
          Component Description - the description of the component specified by the componentUid(String).
 AlertFactory componentUid(String componentUid)
          Component UID - the unique identifier of the component associated with the alert.
 AlertFactory config(Map<String,String> properties)
          Set the configuration properties used to configure the alert bean.
 Alert create()
           
 AlertFactory description(String description)
          Description - a description of the alert.
 AlertFactory groupUid(String groupUid)
          A group unique identifier representing the aggregation of alerts belonging to the same alert bean, for a specific component.
 AlertFactory name(String name)
          Alert name - the name assigned to the alert.
 AlertFactory properties(Map<String,String> properties)
          Set any runtime properties which can be correlated with the appearance of this alert.
 AlertFactory putProperties(Map<String,String> properties)
          Set any runtime properties which can be correlated with the appearance of this alert.
 AlertFactory putProperty(String key, String value)
          Set any runtime property which can be correlated with the appearance of this alert.
 AlertFactory severity(AlertSeverity severity)
          Severity - the defined severity of the alert.
 AlertFactory status(AlertStatus status)
          Status - the status of this alert.
 AlertFactory timestamp(long timestamp)
          Timestamp - the date and time the alert occurred.
 Alert toAlert()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertFactory

public AlertFactory()
A factory for creating an Alert.

  • groupUid(String) - required
  • severity(AlertSeverity) - required
  • status(AlertStatus) - required
  • timestamp(long) - optional, is set upon construction
  • name(String) - optional (null by default)
  • description(String) - optional (null by default)
  • componentUid(String) - optional (null by default)
  • properties(Map) - optional (null by default)
  • config(Map) - optional (null by default)
  • Method Detail

    name

    public AlertFactory name(String name)
    Alert name - the name assigned to the alert.


    description

    public AlertFactory description(String description)
    Description - a description of the alert.


    timestamp

    public AlertFactory timestamp(long timestamp)
    Timestamp - the date and time the alert occurred. Timestamp is already set by the factory upon construction.


    severity

    public AlertFactory severity(AlertSeverity severity)
    Severity - the defined severity of the alert.


    status

    public AlertFactory status(AlertStatus status)
    Status - the status of this alert.


    groupUid

    public AlertFactory groupUid(String groupUid)
    A group unique identifier representing the aggregation of alerts belonging to the same alert bean, for a specific component. The group contains the history of alerts from the first unresolved alert triggered until the alert is resolved.


    componentUid

    public AlertFactory componentUid(String componentUid)
    Component UID - the unique identifier of the component associated with the alert.


    componentDescription

    public AlertFactory componentDescription(String componentDescription)
    Component Description - the description of the component specified by the componentUid(String).


    config

    public AlertFactory config(Map<String,String> properties)
    Set the configuration properties used to configure the alert bean.

    Copies all of the configuration properties from the specified map. Overrides any previously set configuration properties.

    Parameters:
    properties - the configuration properties of the alert bean.

    properties

    public AlertFactory properties(Map<String,String> properties)
    Set any runtime properties which can be correlated with the appearance of this alert. It is useful to put CPU, Memory and GC metrics into the map as a basic set of attributes for ease of troubleshooting.

    Copies all of the properties from the specified map. Overrides any previously set properties.

    Parameters:
    properties - the properties of an alert bean.
    See Also:
    putProperties(Map), putProperty(String, String)

    putProperties

    public AlertFactory putProperties(Map<String,String> properties)
    Set any runtime properties which can be correlated with the appearance of this alert.

    A convenience method for adding properties to an already existing set of properties. Copies all of the properties from the specified map to this map.

    See Also:
    properties(Map)

    putProperty

    public AlertFactory putProperty(String key,
                                    String value)
    Set any runtime property which can be correlated with the appearance of this alert.

    A convenience method for adding a single property to an already existing set of properties.

    See Also:
    properties(Map)

    toAlert

    public Alert toAlert()
    Returns:
    the constructed alert
    Throws:
    AdminException - if required configurations were not set properly (groupUid(String), severity(AlertSeverity), status(AlertStatus))

    create

    public Alert create()
    Returns:
    the constructed alert
    Throws:
    AdminException - if required configurations were not set properly (groupUid(String), severity(AlertSeverity), status(AlertStatus))

    GigaSpaces XAP 9.7.2 API

    Copyright © GigaSpaces.