public class DefaultAlertRepository extends Object implements InternalAlertRepository
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultAlertRepository.AlertGroup |
| Constructor and Description |
|---|
DefaultAlertRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlert(Alert alert)
Add the alert to the repository.
|
Alert |
getAlertByAlertUid(String alertUid)
Get a specific alert by its
Alert.getAlertUid() |
Alert[] |
getAlertsByGroupUid(String groupUid)
Get an array of alerts matching a
Alert.getGroupUid(). |
Iterable<Alert> |
iterateFifo()
An Iterator over the alerts in the repository from the first alert to arrive to the last.
|
Iterable<Alert> |
iterateLifo()
An Iterator over the alerts in the repository from the last alert to arrive to the first.
|
Iterable<Iterable<Alert>> |
list()
An Iterator of Iterators over the alerts in the repository, each iterator groups together
alerts belonging to the same group UID.
|
void |
setStoreLimit(int limit)
The alert repository storage limit for alerts which are unresolved.
|
int |
size()
The number of Alerts stored in this alert repository.
|
public void setStoreLimit(int limit)
InternalAlertRepositorysetStoreLimit in interface InternalAlertRepositorylimit - a limit, default is 200;public void addAlert(Alert alert)
AlertRepositoryaddAlert in interface AlertRepositoryalert - the alert to add to the repository.public Alert getAlertByAlertUid(String alertUid)
AlertRepositoryAlert.getAlertUid()getAlertByAlertUid in interface AlertRepositoryalertUid - The alert unique identifiernull if not match was found.public Alert[] getAlertsByGroupUid(String groupUid)
AlertRepositoryAlert.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.getAlertsByGroupUid in interface AlertRepositorygroupUid - The group unique identifierpublic Iterable<Alert> iterateFifo()
AlertRepositoryiterateFifo in interface AlertRepositorypublic Iterable<Alert> iterateLifo()
AlertRepositoryiterateLifo in interface AlertRepositorypublic Iterable<Iterable<Alert>> list()
AlertRepositorylist in interface AlertRepositorypublic int size()
AlertRepositorysize in interface AlertRepositoryCopyright © GigaSpaces.