AlamKey 값(같은종류 알람)이 같더라도, message 가 다르면 따로 알람하도록,
예시) CircuitBreaker 알람이라도, api에 따라 따로 알람 가야함. Timeout 알람이라도 같은 호스트가 아니면 따로 알람 가야함.
This commit is contained in:
@@ -29,12 +29,13 @@ public class AlarmEvent {
|
|||||||
if (!(o instanceof AlarmEvent)) return false;
|
if (!(o instanceof AlarmEvent)) return false;
|
||||||
|
|
||||||
AlarmEvent that = (AlarmEvent) o;
|
AlarmEvent that = (AlarmEvent) o;
|
||||||
return Objects.equals(this.key, that.key);
|
return Objects.equals(this.key, that.key)
|
||||||
|
&& Objects.equals(this.message, that.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(key);
|
return Objects.hash(key, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user