All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opensearch.cluster.routing.StringKeyDiffProvider Maven / Gradle / Ivy

There is a newer version: 2.18.0
Show newest version
/*
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 */

package org.opensearch.cluster.routing;

import org.opensearch.cluster.DiffableUtils;

import java.util.Map;

/**
 * Interface for providing a difference (diff) between two maps with {@code String} keys and values of type {@code V}.
 * This interface is used to compute and obtain the difference between two versions of a map, typically used
 * in cluster state updates or other scenarios where changes need to be tracked and propagated efficiently.
 *
 * @param  the type of the values in the map
 */
public interface StringKeyDiffProvider {

    /**
     * Provides the difference between two versions of a map with {@code String} keys and values of type {@code V}.
     * The difference is represented as a {@link DiffableUtils.MapDiff} object, which can be used to apply the
     * changes to another map or to serialize the diff.
     *
     * @return a {@link DiffableUtils.MapDiff} object representing the difference between the maps
     */
    DiffableUtils.MapDiff> provideDiff();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy