com.azure.cosmos.implementation.routing.CollectionRoutingMap Maven / Gradle / Ivy
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.cosmos.implementation.routing;
import com.azure.cosmos.implementation.PartitionKeyRange;
import com.azure.cosmos.implementation.apachecommons.lang.tuple.ImmutablePair;
import java.util.Collection;
import java.util.List;
/**
* Used internally in request routing in the Azure Cosmos DB database service.
*/
public interface CollectionRoutingMap {
List getOrderedPartitionKeyRanges();
PartitionKeyRange getRangeByEffectivePartitionKey(String effectivePartitionKeyValue);
PartitionKeyRange getRangeByPartitionKeyRangeId(String partitionKeyRangeId);
List getOverlappingRanges(Range range);
List getOverlappingRanges(Collection> providedPartitionKeyRanges);
PartitionKeyRange tryGetRangeByPartitionKeyRangeId(String partitionKeyRangeId);
IServerIdentity tryGetInfoByPartitionKeyRangeId(String partitionKeyRangeId);
boolean isGone(String partitionKeyRangeId);
String getCollectionUniqueId();
CollectionRoutingMap tryCombine(List> ranges);
}