blob: 15b06d40948304972b3f2ce181e72e5c6baa7b40 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.cloud;
import java.util.Objects;
/**
* Provides information about the system in which this container is running.
* This is available and can be injected when running in a cloud environment.
*
* @author bratseth
*/
public class SystemInfo {
private final Zone zone;
private final Cluster cluster;
private final Node node;
public SystemInfo(Zone zone, Cluster cluster, Node node) {
Objects.requireNonNull(zone, "Zone cannot be null!");
Objects.requireNonNull(cluster, "Cluster cannot be null!");
Objects.requireNonNull(node, "Node cannot be null!");
this.zone = zone;
this.cluster = cluster;
this.node = node;
}
/** Returns the zone this is running in */
public Zone zone() { return zone; }
/** Returns the cluster this is part of */
public Cluster cluster() { return cluster; }
/** Returns the node this is running on */
public Node node() { return node; }
}
|