private static Optional<ApplicationId> applicationIdForLock(Node node) {
        return switch (node.type()) {
            case tenant -> node.allocation().map(Allocation::owner);
            case host -> Optional.of(InfrastructureApplication.TENANT_HOST.id());
            case config -> Optional.of(InfrastructureApplication.CONFIG_SERVER.id());
            case confighost -> Optional.of(InfrastructureApplication.CONFIG_SERVER_HOST.id());
            case controller -> Optional.of(InfrastructureApplication.CONTROLLER.id());
            case controllerhost -> Optional.of(InfrastructureApplication.CONTROLLER_HOST.id());
            case proxy -> Optional.of(InfrastructureApplication.PROXY.id());
            case proxyhost -> Optional.of(InfrastructureApplication.PROXY_HOST.id());
        };
    }
Returns the application ID that should be used for locking when modifying this node
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/Nodes.java