RangeShardMap<TKey> RangeShardMap<TKey> RangeShardMap<TKey> Class

Definition

Represents a shard map of ranges.

public sealed class RangeShardMap<TKey> : Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMap
type RangeShardMap<'Key> = class
    inherit ShardMap
    interface ICloneable<ShardMap>
    interface ICloneable<RangeShardMap<'Key>>
Public NotInheritable Class RangeShardMap(Of TKey)
Inherits ShardMap

Type Parameters

TKey

Key type.

Inheritance
RangeShardMap<TKey>RangeShardMap<TKey>RangeShardMap<TKey>

Methods

Clone() Clone() Clone()

Clones the given range shard map.

CloneCore() CloneCore() CloneCore()

Clones the current shard map instance.

(Inherited from ShardMap)
CreateRangeMapping(Range<TKey>, Shard) CreateRangeMapping(Range<TKey>, Shard) CreateRangeMapping(Range<TKey>, Shard)

Creates and adds a range mapping to ShardMap.

CreateRangeMapping(RangeMappingCreationInfo<TKey>) CreateRangeMapping(RangeMappingCreationInfo<TKey>) CreateRangeMapping(RangeMappingCreationInfo<TKey>)

Creates and adds a range mapping to ShardMap.

CreateShard(ShardCreationInfo) CreateShard(ShardCreationInfo) CreateShard(ShardCreationInfo)

Creates a new shard and registers it with the shard map.

(Inherited from ShardMap)
CreateShard(ShardLocation) CreateShard(ShardLocation) CreateShard(ShardLocation)

Atomically adds a shard to ShardMap using the specified location.

(Inherited from ShardMap)
DeleteMapping(RangeMapping<TKey>) DeleteMapping(RangeMapping<TKey>) DeleteMapping(RangeMapping<TKey>)

Removes a range mapping.

DeleteMapping(RangeMapping<TKey>, MappingLockToken) DeleteMapping(RangeMapping<TKey>, MappingLockToken) DeleteMapping(RangeMapping<TKey>, MappingLockToken)

Removes a range mapping.

DeleteShard(Shard) DeleteShard(Shard) DeleteShard(Shard)

Removes a shard from ShardMap.

(Inherited from ShardMap)
GetMappingForKey(TKey) GetMappingForKey(TKey) GetMappingForKey(TKey)

Looks up the key value and returns the corresponding mapping.

GetMappingLockOwner(RangeMapping<TKey>) GetMappingLockOwner(RangeMapping<TKey>) GetMappingLockOwner(RangeMapping<TKey>)

Gets the lock owner id of the specified mapping.

GetMappings() GetMappings() GetMappings()

Gets all the range mappings for the shard map.

GetMappings(Range<TKey>) GetMappings(Range<TKey>) GetMappings(Range<TKey>)

Gets all the range mappings that exist within given range.

GetMappings(Range<TKey>, Shard) GetMappings(Range<TKey>, Shard) GetMappings(Range<TKey>, Shard)

Gets all the range mappings that exist within given range and given shard.

GetMappings(Shard) GetMappings(Shard) GetMappings(Shard)

Gets all the range mappings that exist for the given shard.

GetShard(ShardLocation) GetShard(ShardLocation) GetShard(ShardLocation)

Obtains the shard for the specified location.

(Inherited from ShardMap)
GetShards() GetShards() GetShards()

Gets all shards from the shard map.

(Inherited from ShardMap)
LockMapping(RangeMapping<TKey>, MappingLockToken) LockMapping(RangeMapping<TKey>, MappingLockToken) LockMapping(RangeMapping<TKey>, MappingLockToken)

Locks the mapping for the specified owner The state of a locked mapping can only be modified by the lock owner.

MarkMappingOffline(RangeMapping<TKey>) MarkMappingOffline(RangeMapping<TKey>) MarkMappingOffline(RangeMapping<TKey>)

Marks the specified mapping offline.

MarkMappingOffline(RangeMapping<TKey>, MappingLockToken) MarkMappingOffline(RangeMapping<TKey>, MappingLockToken) MarkMappingOffline(RangeMapping<TKey>, MappingLockToken)

Marks the specified mapping offline.

MarkMappingOnline(RangeMapping<TKey>) MarkMappingOnline(RangeMapping<TKey>) MarkMappingOnline(RangeMapping<TKey>)

Marks the specified mapping online.

MarkMappingOnline(RangeMapping<TKey>, MappingLockToken) MarkMappingOnline(RangeMapping<TKey>, MappingLockToken) MarkMappingOnline(RangeMapping<TKey>, MappingLockToken)

Marks the specified mapping online.

MergeMappings(RangeMapping<TKey>, RangeMapping<TKey>) MergeMappings(RangeMapping<TKey>, RangeMapping<TKey>) MergeMappings(RangeMapping<TKey>, RangeMapping<TKey>)

Merges 2 contiguous mappings into a single mapping. Both left and right mappings should point to the same location and must be contiguous.

MergeMappings(RangeMapping<TKey>, RangeMapping<TKey>, MappingLockToken, MappingLockToken) MergeMappings(RangeMapping<TKey>, RangeMapping<TKey>, MappingLockToken, MappingLockToken) MergeMappings(RangeMapping<TKey>, RangeMapping<TKey>, MappingLockToken, MappingLockToken)

Merges 2 contiguous mappings into a single mapping. Both left and right mappings should point to the same location and must be contiguous.

OpenConnectionForKey(TKey, String) OpenConnectionForKey(TKey, String) OpenConnectionForKey(TKey, String)

Opens a regular SqlConnection to the shard to which the specified key value is mapped, with Validate.

OpenConnectionForKey(TKey, String, ConnectionOptions) OpenConnectionForKey(TKey, String, ConnectionOptions) OpenConnectionForKey(TKey, String, ConnectionOptions)

Opens a regular SqlConnection to the shard to which the specified key value is mapped.

OpenConnectionForKey<TKey>(TKey, String) OpenConnectionForKey<TKey>(TKey, String) OpenConnectionForKey<TKey>(TKey, String)

Opens a regular SqlConnection to the shard to which the specified key value is mapped, with Validate.

(Inherited from ShardMap)
OpenConnectionForKey<TKey>(TKey, String, ConnectionOptions) OpenConnectionForKey<TKey>(TKey, String, ConnectionOptions) OpenConnectionForKey<TKey>(TKey, String, ConnectionOptions)

Opens a regular SqlConnection to the shard to which the specified key value is mapped.

(Inherited from ShardMap)
OpenConnectionForKeyAsync(TKey, String) OpenConnectionForKeyAsync(TKey, String) OpenConnectionForKeyAsync(TKey, String)

Asynchronously opens a regular SqlConnection to the shard to which the specified key value is mapped, with Validate.

OpenConnectionForKeyAsync(TKey, String, ConnectionOptions) OpenConnectionForKeyAsync(TKey, String, ConnectionOptions) OpenConnectionForKeyAsync(TKey, String, ConnectionOptions)

Asynchronously opens a regular SqlConnection to the shard to which the specified key value is mapped.

OpenConnectionForKeyAsync<TKey>(TKey, String) OpenConnectionForKeyAsync<TKey>(TKey, String) OpenConnectionForKeyAsync<TKey>(TKey, String)

Asynchronously opens a regular SqlConnection to the shard to which the specified key value is mapped, with Validate.

(Inherited from ShardMap)
OpenConnectionForKeyAsync<TKey>(TKey, String, ConnectionOptions) OpenConnectionForKeyAsync<TKey>(TKey, String, ConnectionOptions) OpenConnectionForKeyAsync<TKey>(TKey, String, ConnectionOptions)

Asynchronously opens a regular SqlConnection to the shard to which the specified key value is mapped.

(Inherited from ShardMap)
SplitMapping(RangeMapping<TKey>, TKey) SplitMapping(RangeMapping<TKey>, TKey) SplitMapping(RangeMapping<TKey>, TKey)

Splits the specified mapping into two new mappings using the specified key as boundary. The new mappings point to the same shard as the existing mapping.

SplitMapping(RangeMapping<TKey>, TKey, MappingLockToken) SplitMapping(RangeMapping<TKey>, TKey, MappingLockToken) SplitMapping(RangeMapping<TKey>, TKey, MappingLockToken)

Splits the specified mapping into two new mappings using the specified key as boundary. The new mappings point to the same shard as the existing mapping.

ToString() ToString() ToString()

Converts the object to its string representation.

(Inherited from ShardMap)
TryGetMappingForKey(TKey, RangeMapping<TKey>) TryGetMappingForKey(TKey, RangeMapping<TKey>) TryGetMappingForKey(TKey, RangeMapping<TKey>)

Tries to looks up the key value and place the corresponding mapping in rangeMapping.

TryGetShard(ShardLocation, Shard) TryGetShard(ShardLocation, Shard) TryGetShard(ShardLocation, Shard)

Tries to obtains the shard for the specified location.

(Inherited from ShardMap)
UnlockMapping(MappingLockToken) UnlockMapping(MappingLockToken) UnlockMapping(MappingLockToken)

Unlocks all mappings in this map that belong to the given MappingLockToken

UnlockMapping(RangeMapping<TKey>, MappingLockToken) UnlockMapping(RangeMapping<TKey>, MappingLockToken) UnlockMapping(RangeMapping<TKey>, MappingLockToken)

Unlocks the specified mapping

UpdateMapping(RangeMapping<TKey>, RangeMappingUpdate) UpdateMapping(RangeMapping<TKey>, RangeMappingUpdate) UpdateMapping(RangeMapping<TKey>, RangeMappingUpdate)

Updates a RangeMapping<TKey> with the updates provided in the update parameter.

UpdateMapping(RangeMapping<TKey>, RangeMappingUpdate, MappingLockToken) UpdateMapping(RangeMapping<TKey>, RangeMappingUpdate, MappingLockToken) UpdateMapping(RangeMapping<TKey>, RangeMappingUpdate, MappingLockToken)

Updates a RangeMapping<TKey> with the updates provided in the update parameter.

Properties

KeyType KeyType KeyType

Shard map key type.

(Inherited from ShardMap)
MapType MapType MapType

Shard map type.

(Inherited from ShardMap)
Name Name Name

Shard map name.

(Inherited from ShardMap)

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

AsListShardMap<TKey>(ShardMap) AsListShardMap<TKey>(ShardMap) AsListShardMap<TKey>(ShardMap)

Downcasts to ListShardMap of TKey.

AsRangeShardMap<TKey>(ShardMap) AsRangeShardMap<TKey>(ShardMap) AsRangeShardMap<TKey>(ShardMap)

Downcasts to RangeShardMap of TKey.

Applies to