diff options
author | Jon Bratseth <bratseth@gmail.com> | 2020-09-29 11:27:02 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2020-09-29 11:27:02 +0200 |
commit | 3d05f38f1f67b7be20346878ea0c8fa0547c18a4 (patch) | |
tree | c0658f662aa8ddaceac59c496bf059b00671663e /node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Nodelike.java | |
parent | 628a9a9dd57d9eadd3ad786c5cde40ccfec1ba63 (diff) |
Add Nodelike interface
Diffstat (limited to 'node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Nodelike.java')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Nodelike.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Nodelike.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Nodelike.java new file mode 100644 index 00000000000..a246d2a5cb8 --- /dev/null +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/Nodelike.java @@ -0,0 +1,23 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.hosted.provision; + +import com.yahoo.config.provision.NodeResources; +import com.yahoo.config.provision.NodeType; + +import java.util.Optional; + +/** + * The API of anything that can behave essentially like a node. + * + * @author bratseth + */ +public interface Nodelike { + + NodeResources resources(); + + /** Returns the hostname oif the parent if this is a child node */ + Optional<String> parentHostname(); + + NodeType type(); + +} |