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

com.azure.cosmos.implementation.changefeed.epkversion.PartitionSynchronizer Maven / Gradle / Ivy

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.cosmos.implementation.changefeed.epkversion;

import com.azure.cosmos.implementation.changefeed.Lease;
import com.azure.cosmos.implementation.changefeed.exceptions.FeedRangeGoneException;
import com.azure.cosmos.implementation.changefeed.epkversion.feedRangeGoneHandler.FeedRangeGoneHandler;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * READ DocDB partitions and create leases if they do not exist.
 */
public interface PartitionSynchronizer {
    /**
     * Creates missing leases.
     *
     * @return a deferred computation of this operation.
     */
    Mono createMissingLeases();

    /***
     * Create epk version leases based on pkRangeId version leases.
     *
     * @param pkRangeIdVersionLeases partitionKeyRangeId based leases.
     * @return a deferred computation of this operation.
     */
    Mono createMissingLeases(List pkRangeIdVersionLeases);

    /***
     * Get the feedRangeGone handler based on whether it is merge or split.
     *
     * @param lease then lease of where {@link FeedRangeGoneException} exception happened.
     * @return the {@link FeedRangeGoneHandler}.
     */
    Mono getFeedRangeGoneHandler(Lease lease);
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy