summaryrefslogtreecommitdiffstats
path: root/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java61
1 files changed, 22 insertions, 39 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java
index e70b0f1a599..b7969267328 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java
@@ -18,6 +18,21 @@ import java.util.stream.Stream;
* @author mortent
*/
public class ApplicationClusterEndpoint {
+ @Override
+ public String toString() {
+ return "ApplicationClusterEndpoint{" +
+ "dnsName=" + dnsName +
+ ", scope=" + scope +
+ ", routingMethod=" + routingMethod +
+ ", weight=" + weight +
+ ", hostNames=" + hostNames +
+ ", clusterId='" + clusterId + "'" +
+ '}';
+ }
+
+ public enum Scope {application, global, zone}
+
+ public enum RoutingMethod {shared, sharedLayer4, exclusive}
private final DnsName dnsName;
private final Scope scope;
@@ -25,16 +40,14 @@ public class ApplicationClusterEndpoint {
private final int weight;
private final List<String> hostNames;
private final String clusterId;
- private final AuthMethod authMethod;
- private ApplicationClusterEndpoint(DnsName dnsName, Scope scope, RoutingMethod routingMethod, int weight, List<String> hostNames, String clusterId, AuthMethod authMethod) {
- this.dnsName = Objects.requireNonNull(dnsName);
- this.scope = Objects.requireNonNull(scope);
- this.routingMethod = Objects.requireNonNull(routingMethod);
+ private ApplicationClusterEndpoint(DnsName dnsName, Scope scope, RoutingMethod routingMethod, int weight, List<String> hostNames, String clusterId) {
+ this.dnsName = dnsName;
+ this.scope = scope;
+ this.routingMethod = routingMethod;
this.weight = weight;
- this.hostNames = List.copyOf(Objects.requireNonNull(hostNames));
- this.clusterId = Objects.requireNonNull(clusterId);
- this.authMethod = Objects.requireNonNull(authMethod);
+ this.hostNames = List.copyOf(hostNames);
+ this.clusterId = clusterId;
}
public DnsName dnsName() {
@@ -61,33 +74,10 @@ public class ApplicationClusterEndpoint {
return clusterId;
}
- public AuthMethod authMethod() {
- return authMethod;
- }
-
- @Override
- public String toString() {
- return "ApplicationClusterEndpoint{" +
- "dnsName=" + dnsName +
- ", scope=" + scope +
- ", routingMethod=" + routingMethod +
- ", weight=" + weight +
- ", hostNames=" + hostNames +
- ", clusterId='" + clusterId + '\'' +
- ", authMethod=" + authMethod +
- '}';
- }
-
public static Builder builder() {
return new Builder();
}
- public enum Scope { application, global, zone }
-
- public enum RoutingMethod { shared, sharedLayer4, exclusive }
-
- public enum AuthMethod { mtls, token }
-
public static class Builder {
private DnsName dnsName;
@@ -96,7 +86,6 @@ public class ApplicationClusterEndpoint {
private int weigth = 1;
private List<String> hosts;
private String clusterId;
- private AuthMethod authMethod;
public Builder dnsName(DnsName name) {
this.dnsName = name;
@@ -143,15 +132,9 @@ public class ApplicationClusterEndpoint {
return this;
}
- public Builder authMethod(AuthMethod authMethod) {
- this.authMethod = authMethod;
- return this;
- }
-
public ApplicationClusterEndpoint build() {
- return new ApplicationClusterEndpoint(dnsName, scope, routingMethod, weigth, hosts, clusterId, authMethod);
+ return new ApplicationClusterEndpoint(dnsName, scope, routingMethod, weigth, hosts, clusterId);
}
-
}
public static class DnsName implements Comparable<DnsName> {