summaryrefslogtreecommitdiffstats
path: root/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java
diff options
context:
space:
mode:
authorMorten Tokle <mortent@verizonmedia.com>2021-11-11 09:57:12 +0100
committerMorten Tokle <mortent@verizonmedia.com>2021-11-11 09:57:12 +0100
commita82e358062c9f5f60b45f52fe35a23b31358f139 (patch)
treeb3ae4a5b405dde20236d3e0415ff27b1b1cd0b72 /config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java
parentf60df260aab56636101988591a516827f7030a73 (diff)
Support application level endpoints
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java
index 2b2b5e2c404..a114f9d40ef 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java
@@ -14,10 +14,12 @@ import java.util.Objects;
public class ContainerEndpoint {
private final String clusterId;
+ private final ApplicationClusterEndpoint.Scope scope;
private final List<String> names;
- public ContainerEndpoint(String clusterId, List<String> names) {
+ public ContainerEndpoint(String clusterId, ApplicationClusterEndpoint.Scope scope, List<String> names) {
this.clusterId = Objects.requireNonNull(clusterId);
+ this.scope = Objects.requireNonNull(scope);
this.names = List.copyOf(Objects.requireNonNull(names));
}
@@ -29,23 +31,28 @@ public class ContainerEndpoint {
return names;
}
+ public ApplicationClusterEndpoint.Scope scope() {
+ return scope;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ContainerEndpoint that = (ContainerEndpoint) o;
return Objects.equals(clusterId, that.clusterId) &&
+ Objects.equals(scope, that.scope) &&
Objects.equals(names, that.names);
}
@Override
public int hashCode() {
- return Objects.hash(clusterId, names);
+ return Objects.hash(clusterId, names, scope);
}
@Override
public String toString() {
- return String.format("container endpoint %s -> %s", clusterId, names);
+ return String.format("container endpoint %s -> %s [scope=%s]", clusterId, names, scope);
}
}