diff options
author | Haakon Dybdahl <dybdahl@yahoo-inc.com> | 2016-06-30 13:00:43 +0200 |
---|---|---|
committer | Haakon Dybdahl <dybdahl@yahoo-inc.com> | 2016-06-30 13:00:43 +0200 |
commit | 5b1906e5ec584ce811dcb870b31f7b73ba508152 (patch) | |
tree | ab5d7760a4dd0b2a4c50a6681cac34415a53d196 /node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java | |
parent | f8bc6e9dd423056b4520749d41ab7f5d0b871197 (diff) |
Code review based improvements.
Diffstat (limited to 'node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java index bbed28d541a..fb65f03a57b 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeadmin/NodeAdmin.java @@ -8,20 +8,40 @@ import java.util.List; import java.util.Set; /** - * API for NodeAdmin seen from outside. + * NodeAdmin manages the life cycle of NodeAgents. * @author dybis */ public interface NodeAdmin { + /** + * Calling this will cause NodeAdmin to move to the state containersToRun by adding or removing nodes. + * @param containersToRun this is the wanted state. + */ void refreshContainersToRun(final List<ContainerNodeSpec> containersToRun); + /** + * Causes the NodeAgents to freeze, meaning they will not pick up any changes from NodeRepository. + * @return if NodeAgent is frozen. + */ boolean freezeAndCheckIfAllFrozen(); + /** + * Causes the NodeAgent to unfreeze and start picking up changes from NodeRepository. + */ void unfreeze(); + /** + * Returns list of hosts. + */ Set<HostName> getListOfHosts(); + /** + * Return the state as a human readable string. Do not try to parse output or use in tests. + */ String debugInfo(); + /** + * Stop the NodeAgent. Will not delete the storage or stop the container. + */ void shutdown(); } |