summaryrefslogtreecommitdiffstats
path: root/hosted-zone-api
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2021-12-10 15:38:21 +0100
committerGitHub <noreply@github.com>2021-12-10 15:38:21 +0100
commit08555794357171dbd299d80ed3e8d353c7b79e9f (patch)
treeb5dd60f1938f743c9798e401f3b29b30aad830a2 /hosted-zone-api
parent8ff6429daf9a695f2fa5d45a8033c75fdadfcfe2 (diff)
Revert "Add zone info to query profile context"
Diffstat (limited to 'hosted-zone-api')
-rw-r--r--hosted-zone-api/abi-spec.json5
-rw-r--r--hosted-zone-api/src/main/java/ai/vespa/cloud/ZoneInfo.java24
2 files changed, 5 insertions, 24 deletions
diff --git a/hosted-zone-api/abi-spec.json b/hosted-zone-api/abi-spec.json
index 11375d97972..b1b8eb84705 100644
--- a/hosted-zone-api/abi-spec.json
+++ b/hosted-zone-api/abi-spec.json
@@ -105,11 +105,8 @@
"public"
],
"methods": [
- "public void <init>(ai.vespa.cloud.ApplicationId, ai.vespa.cloud.Zone)",
"public void <init>(ai.vespa.cloud.Zone)",
- "public ai.vespa.cloud.ApplicationId application()",
- "public ai.vespa.cloud.Zone zone()",
- "public static ai.vespa.cloud.ZoneInfo defaultInfo()"
+ "public ai.vespa.cloud.Zone zone()"
],
"fields": []
}
diff --git a/hosted-zone-api/src/main/java/ai/vespa/cloud/ZoneInfo.java b/hosted-zone-api/src/main/java/ai/vespa/cloud/ZoneInfo.java
index e4b69caa940..d9af2421ab9 100644
--- a/hosted-zone-api/src/main/java/ai/vespa/cloud/ZoneInfo.java
+++ b/hosted-zone-api/src/main/java/ai/vespa/cloud/ZoneInfo.java
@@ -4,9 +4,9 @@ package ai.vespa.cloud;
import java.util.Objects;
/**
- * Provides information about the zone context in which this container is running.
+ * Provides information about the zone in which this container is running.
* This is available and can be injected when running in a cloud environment.
- * If you don't need any other information than what's present here this should be preferred
+ * If you don't need any other information than the zone this should be preferred
* to SystemInfo as it will never change at runtime and therefore does not
* cause unnecessary reconstruction.
*
@@ -14,30 +14,14 @@ import java.util.Objects;
*/
public class ZoneInfo {
- private static final ZoneInfo defaultInfo = new ZoneInfo(new ApplicationId("default", "default", "default"),
- new Zone(Environment.prod, "default"));
-
- private final ApplicationId application;
private final Zone zone;
- public ZoneInfo(ApplicationId application, Zone zone) {
- this.application = Objects.requireNonNull(application, "Application cannot be null!");
- this.zone = Objects.requireNonNull(zone, "Zone cannot be null!");
- }
-
- /** @deprecated pass an application id */
- @Deprecated // Remove on Vespa 8
public ZoneInfo(Zone zone) {
- this(new ApplicationId("default", "default", "default"), zone);
+ Objects.requireNonNull(zone, "Zone cannot be null!");
+ this.zone = zone;
}
- /** Returns the application this is running as part of */
- public ApplicationId application() { return application; }
-
/** Returns the zone this is running in */
public Zone zone() { return zone; }
- /** Returns the info instance used when no zone info is available because we're not running in a cloud context */
- public static ZoneInfo defaultInfo() { return defaultInfo; }
-
}