@Entity public class AlertHistoryEntity extends Object
AlertHistoryEntity
class is an instance of an alert state change
that was received. Instances are only stored in the history if there is a
state change event. Subsequent alerts that are received for the same state
update the timestamps in AlertNoticeEntity
but do not receive a new
AlertHistoryEntity
.Constructor and Description |
---|
AlertHistoryEntity()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Gets the equality to another historical alert entry based on the following criteria:
alertId
clusterId
alertInstance
alertLabel
alertState
alertText
alertTimestamp
serviceName
componentName
hostName
alertDefinition
However, since we're guaranteed that alertId is unique among persisted entities, we
can return the hashCode based on this value if it is set. |
AlertDefinitionEntity |
getAlertDefinition()
Gets the associated alert definition for this alert instance.
|
int |
getAlertDefinitionHash() |
Long |
getAlertDefinitionId()
Get parent alert definition id
|
Long |
getAlertId()
Gets the unique ID for this alert instance.
|
String |
getAlertInstance()
Gets the instance identifier, if any, for this alert instance.
|
String |
getAlertLabel()
Gets the label for this alert instance.
|
AlertState |
getAlertState()
Gets the state of this alert instance.
|
String |
getAlertText()
Gets the text of the alert instance.
|
Long |
getAlertTimestamp()
Gets the time that the alert instace was received.
|
Long |
getClusterId()
Gets the ID of the cluster that this alert is associated with.
|
String |
getComponentName()
Gets the name of the component, if any, that this alert instance is for.
|
String |
getHostName()
Gets the name of the host that the alert is for.
|
String |
getServiceName()
Gets the name of the service that the alert is defined for.
|
int |
hashCode()
Gets a hash to uniquely identify this historical alert instance.
|
void |
setAlertDefinition(AlertDefinitionEntity alertDefinition)
Sets the associated alert definition for this alert instance.
|
void |
setAlertDefinitionId(Long alertDefinitionId)
Set parent alert definition id
|
void |
setAlertId(Long alertId)
Sets the unique ID for this alert instance.
|
void |
setAlertInstance(String alertInstance)
Sets the instance identifier, if any, for this alert instance.
|
void |
setAlertLabel(String alertLabel)
Sets the label for this alert instance.
|
void |
setAlertState(AlertState alertState)
Sets the state of this alert instance.
|
void |
setAlertText(String alertText)
Sets the text of the alert instance.
|
void |
setAlertTimestamp(Long alertTimestamp)
Sets the time that the alert instace was received.
|
void |
setClusterId(Long clusterId)
Sets the ID of the cluster that this alert is associated with.
|
void |
setComponentName(String componentName)
Sets the name of the component that this alert instance is associated with.
|
void |
setHostName(String hostName)
Sets the name of the host that the alert is for.
|
void |
setServiceName(String serviceName)
Sets the name of the service that the alert is defined for.
|
String |
toString() |
public Long getAlertId()
null
).public void setAlertId(Long alertId)
alertId
- the unique ID (not null
).public String getAlertInstance()
null
if none.public void setAlertInstance(String alertInstance)
alertInstance
- the instance ID or null
if none.public String getAlertLabel()
null
if none.getAlertText()
public void setAlertLabel(String alertLabel)
alertLabel
- the label or null
if none.public AlertState getAlertState()
null
).public void setAlertState(AlertState alertState)
alertState
- the alert state (not null
).public String getAlertText()
null
if none.public void setAlertText(String alertText)
alertText
- the text, or null
if none.public Long getAlertTimestamp()
null
).public void setAlertTimestamp(Long alertTimestamp)
alertTimestamp
- the time of the alert instance (not null
).public Long getClusterId()
null
).public void setClusterId(Long clusterId)
clusterId
- the ID of the cluster for the server that this alert is for (never
null
).public String getComponentName()
null
for none.public void setComponentName(String componentName)
componentName
- the name of the component, or null
if none.public String getHostName()
null
.null
if none.public void setHostName(String hostName)
hostName
- the name of the host or null
if none.public String getServiceName()
null
).public void setServiceName(String serviceName)
serviceName
- the name of the service (not null
).public AlertDefinitionEntity getAlertDefinition()
null
).public void setAlertDefinition(AlertDefinitionEntity alertDefinition)
alertDefinition
- the alert definition (not null
).public Long getAlertDefinitionId()
public void setAlertDefinitionId(Long alertDefinitionId)
alertDefinitionId
- definition idpublic boolean equals(Object object)
alertId
clusterId
alertInstance
alertLabel
alertState
alertText
alertTimestamp
serviceName
componentName
hostName
alertDefinition
alertId
is unique among persisted entities, we
can return the hashCode based on this value if it is set.
public int hashCode()
alertId
is unique among persisted entities, we
can return the hashCode based on this value if it is set.
public int getAlertDefinitionHash()
Copyright © 2022 Apache Software Foundation. All rights reserved.