<commit_before>// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server.application;

import com.yahoo.config.model.api.Reindexing;

import java.time.Instant;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Stream;

import static java.util.Objects.requireNonNull;
import static java.util.stream.Collectors.toUnmodifiableMap;

/**
 * Pending and ready reindexing per document type. Each document type can have either a pending or a ready reindexing.
 * Each cluster may also have a global status, which is merged with its document type-specific status, by selecting
 * whichever status is ready the latest. The application may also have a global status, which is merged likewise.
 * This is immutable.
 *
 * @author jonmv
 */
public class ApplicationReindexing implements Reindexing {

    private static final ApplicationReindexing empty = new ApplicationReindexing(Status.ALWAYS_READY, Map.of());

    private final Status common;
    private final Map<String, Cluster> clusters;

    public ApplicationReindexing(Status common, Map<String, Cluster> clusters) {
        this.common = requireNonNull(common);
        this.clusters = Map.copyOf(clusters);
    }

    /** Reindexing for the whole application ready now. */
    public static ApplicationReindexing ready(Instant now) {<commit_msg>Remove unused member<commit_after>// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server.application;

import com.yahoo.config.model.api.Reindexing;

import java.time.Instant;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Stream;

import static java.util.Objects.requireNonNull;
import static java.util.stream.Collectors.toUnmodifiableMap;

/**
 * Pending and ready reindexing per document type. Each document type can have either a pending or a ready reindexing.
 * Each cluster may also have a global status, which is merged with its document type-specific status, by selecting
 * whichever status is ready the latest. The application may also have a global status, which is merged likewise.
 * This is immutable.
 *
 * @author jonmv
 */
public class ApplicationReindexing implements Reindexing {

    private final Status common;
    private final Map<String, Cluster> clusters;

    public ApplicationReindexing(Status common, Map<String, Cluster> clusters) {
        this.common = requireNonNull(common);
        this.clusters = Map.copyOf(clusters);
    }

    /** Reindexing for the whole application ready now. */
    public static ApplicationReindexing ready(Instant now) {
{'fraction_non_alphanumeric': 0.07550644567219153, 'fraction_numerical': 0.0014732965009208103, 'mean_word_length': 4.27378640776699, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6207755', 'n_tokens_mistral': 728, 'n_tokens_neox': 707, 'n_words': 276}