Class DefaultAlertRepository
java.lang.Object
org.openspaces.admin.internal.alert.DefaultAlertRepository
- All Implemented Interfaces:
AlertRepository,InternalAlertRepository
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the alert to the repository.getAlertByAlertUid(String alertUid) Get a specific alert by itsAlert.getAlertUid()Alert[]getAlertsByGroupUid(String groupUid) Get an array of alerts matching aAlert.getGroupUid().An Iterator over the alerts in the repository from the first alert to arrive to the last.An Iterator over the alerts in the repository from the last alert to arrive to the first.list()An Iterator of Iterators over the alerts in the repository, each iterator groups together alerts belonging to the same group UID.voidsetStoreLimit(int limit) The alert repository storage limit for alerts which are unresolved.intsize()The number of Alerts stored in this alert repository.
-
Constructor Details
-
DefaultAlertRepository
public DefaultAlertRepository()
-
-
Method Details
-
setStoreLimit
public void setStoreLimit(int limit) Description copied from interface:InternalAlertRepositoryThe alert repository storage limit for alerts which are unresolved.- Specified by:
setStoreLimitin interfaceInternalAlertRepository- Parameters:
limit- a limit, default is 200;
-
addAlert
Description copied from interface:AlertRepositoryAdd the alert to the repository. The added alert will be set with an alert UID.- Specified by:
addAlertin interfaceAlertRepository- Parameters:
alert- the alert to add to the repository.
-
getAlertByAlertUid
Description copied from interface:AlertRepositoryGet a specific alert by itsAlert.getAlertUid()- Specified by:
getAlertByAlertUidin interfaceAlertRepository- Parameters:
alertUid- The alert unique identifier- Returns:
- The alert matching this UID.
nullif not match was found.
-
getAlertsByGroupUid
Description copied from interface:AlertRepositoryGet an array of alerts matching aAlert.getGroupUid(). The alerts are ordered in a LIFO order. Last alert to arrive of the same group will be in index zero, first alert to arrive of the same group will be in index size -1.- Specified by:
getAlertsByGroupUidin interfaceAlertRepository- Parameters:
groupUid- The group unique identifier- Returns:
- The alerts belonging to this group UID. Zero-length array if no match was found.
-
iterateFifo
Description copied from interface:AlertRepositoryAn Iterator over the alerts in the repository from the first alert to arrive to the last.- Specified by:
iterateFifoin interfaceAlertRepository- Returns:
- an iterator in a first-in (the group) and first-out (of iterator) order.
-
iterateLifo
Description copied from interface:AlertRepositoryAn Iterator over the alerts in the repository from the last alert to arrive to the first.- Specified by:
iterateLifoin interfaceAlertRepository- Returns:
- an iterator in a last-in (the group) and first-out (of iterator) order.
-
list
Description copied from interface:AlertRepositoryAn Iterator of Iterators over the alerts in the repository, each iterator groups together alerts belonging to the same group UID. The list is ordered by sequence of alert events, first iterator is the last group to be have been updated. There may be more than one Iterator with the same group UID (this happens when a 'group' is resolved, and new alerts with the same group UID arrive at a later time).- Specified by:
listin interfaceAlertRepository- Returns:
- an iterator in a last-updated (per group) order.
-
size
public int size()Description copied from interface:AlertRepositoryThe number of Alerts stored in this alert repository.- Specified by:
sizein interfaceAlertRepository- Returns:
- the size of the repository.
-