Package org.openspaces.admin.alert
Class AlertFactory
java.lang.Object
org.openspaces.admin.alert.AlertFactory
A factory for constructing an alert instance to be fired by an alert bean.
- Since:
- 8.0
- Author:
- Moran Avigdor
-
Constructor Summary
ConstructorsConstructorDescriptionA factory for creating anAlert.AlertFactory(String groupUid, AlertSeverity alertSeverity, AlertStatus alertStatus) A factory for creating anAlertwith the required fields. -
Method Summary
Modifier and TypeMethodDescriptioncomponentDescription(String componentDescription) Component Description - the description of the component specified by thecomponentUid(String).componentUid(String componentUid) Component UID - the unique identifier of the component associated with the alert.Set the configuration properties used to configure the alert bean.create()description(String description) Description - a description of the alert.A group unique identifier representing the aggregation of alerts belonging to the same alert bean, for a specific component.Alert name - the name assigned to the alert.properties(Map<String, String> properties) Set any runtime properties which can be correlated with the appearance of this alert.putProperties(Map<String, String> properties) Set any runtime properties which can be correlated with the appearance of this alert.putProperty(String key, String value) Set any runtime property which can be correlated with the appearance of this alert.severity(AlertSeverity severity) Severity - the defined severity of the alert.status(AlertStatus status) Status - the status of this alert.timestamp(long timestamp) Timestamp - the date and time the alert occurred.toAlert()
-
Constructor Details
-
AlertFactory
public AlertFactory()A factory for creating anAlert.groupUid(String)- requiredseverity(AlertSeverity)- requiredstatus(AlertStatus)- requiredtimestamp(long)- optional, is set upon constructionname(String)- optional (nullby default)description(String)- optional (nullby default)componentUid(String)- optional (nullby default)properties(Map)- optional (nullby default)config(Map)- optional (nullby default) -
AlertFactory
A factory for creating anAlertwith the required fields. UseAlertFactory()for a more general construction.- Parameters:
groupUid- The alert's group UIDalertSeverity- The alert's severityalertStatus- The alert's status- Since:
- 12.0.0
- See Also:
-
-
Method Details
-
name
Alert name - the name assigned to the alert. -
description
Description - a description of the alert. -
timestamp
Timestamp - the date and time the alert occurred. Timestamp is already set by the factory upon construction. -
severity
Severity - the defined severity of the alert. -
status
Status - the status of this alert. -
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
Component UID - the unique identifier of the component associated with the alert. -
componentDescription
Component Description - the description of the component specified by thecomponentUid(String). -
config
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
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
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:
-
putProperty
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:
-
toAlert
- Returns:
- the constructed alert
- Throws:
AdminException- if required configurations were not set properly (groupUid(String),severity(AlertSeverity),status(AlertStatus))
-
create
- Returns:
- the constructed alert
- Throws:
AdminException- if required configurations were not set properly (groupUid(String),severity(AlertSeverity),status(AlertStatus))
-