summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2019-01-25 14:45:21 +0100
committerMartin Polden <mpolden@mpolden.no>2019-01-25 14:45:21 +0100
commit8d90a1fd5a0e6b08ab03ab9497e2508a8e15fcae (patch)
tree6b109f250b0237a1e35ad6c1e0f47b1c4ae47a69 /controller-api
parent01c8dd3582c3c86a7fab4699617ef9d1eec13681 (diff)
Simplify DNS record cleanup
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java
index 114ae4dbfe7..b77b63cab8a 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/LoadBalancer.java
@@ -7,12 +7,15 @@ import com.yahoo.vespa.hosted.controller.api.identifiers.ApplicationId;
import com.yahoo.vespa.hosted.controller.api.identifiers.InstanceId;
import com.yahoo.vespa.hosted.controller.api.identifiers.TenantId;
+import java.util.Objects;
+
/**
- * A load balancer
+ * Represents an exclusive load balancer, assigned to an application's cluster.
*
* @author mortent
*/
public class LoadBalancer {
+
private final String id;
private final TenantId tenant;
private final ApplicationId application;
@@ -21,12 +24,12 @@ public class LoadBalancer {
private final HostName hostname;
public LoadBalancer(String id, TenantId tenant, ApplicationId application, InstanceId instance, ClusterSpec.Id cluster, HostName hostname) {
- this.id = id;
- this.tenant = tenant;
- this.application = application;
- this.instance = instance;
- this.cluster = cluster;
- this.hostname = hostname;
+ this.id = Objects.requireNonNull(id, "id must be non-null");
+ this.tenant = Objects.requireNonNull(tenant, "tenant must be non-null");
+ this.application = Objects.requireNonNull(application, "application must be non-null");
+ this.instance = Objects.requireNonNull(instance, "instance must be non-null");
+ this.cluster = Objects.requireNonNull(cluster, "cluster must be non-null");
+ this.hostname = Objects.requireNonNull(hostname, "hostname must be non-null");
}
public String id() {
@@ -52,4 +55,5 @@ public class LoadBalancer {
public HostName hostname() {
return hostname;
}
+
}