summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@verizonmedia.com>2019-10-10 09:51:02 +0200
committerGitHub <noreply@github.com>2019-10-10 09:51:02 +0200
commit607c054896d7034175ee2958ebabbfe79038c5a3 (patch)
tree408d8b9eb9ac943021c2c45bd2e2611648adf984 /controller-api
parentbd2a77e32e6138418981c6c202b371811fd08e54 (diff)
parent9ed8162d11b2f1e7042fef2d4a5e030af71948ed (diff)
Merge pull request #10934 from vespa-engine/mpolden/change-status-of-all-endpoints
Change status of all endpoints when overriding global status
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java
index 95ca7988d58..59ad23aaa23 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/routing/RoutingEndpoint.java
@@ -1,6 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.routing;
+import java.util.Objects;
+
/**
* @author smorgrav
*/
@@ -38,4 +40,20 @@ public class RoutingEndpoint {
return upstreamName;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ RoutingEndpoint that = (RoutingEndpoint) o;
+ return isGlobal == that.isGlobal &&
+ endpoint.equals(that.endpoint) &&
+ hostname.equals(that.hostname) &&
+ upstreamName.equals(that.upstreamName);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(isGlobal, endpoint, hostname, upstreamName);
+ }
+
}