private static NodeState computeEffectiveNodeState(final NodeInfo nodeInfo,
                                                       final Params params,
                                                       Map<Node, NodeStateReason> nodeStateReasons)
    {
        final NodeState reported = nodeInfo.getReportedState();
        final NodeState wanted   = nodeInfo.getWantedState();
        final NodeState baseline = reported.clone();

        if (nodeIsConsideredTooUnstable(nodeInfo, params)) {
            baseline.setState(State.DOWN);
        }
        if (startupTimestampAlreadyObservedByAllNodes(nodeInfo, baseline)) {
            baseline.setStartTimestamp(0);
        }
        if (nodeInfo.isStorage()) {
            applyStorageSpecificStateTransforms(nodeInfo, params, reported, wanted, baseline, nodeStateReasons);
        }
        if (baseline.above(wanted)) {
            applyWantedStateToBaselineState(baseline, wanted);
        }

        return baseline;
    }
Infer parameters from controller options. Important: does _not_ set cluster;
it must be explicitly set afterwards on the returned parameter object before
being used to compute states.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStateGenerator.java