RangeShardMap.TryGetMappingForKey Method

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

Namespace: Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement
Assembly: Microsoft.Azure.SqlDatabase.ElasticScale.Client (in Microsoft.Azure.SqlDatabase.ElasticScale.Client.dll)

Usage

'Usage
Dim instance As RangeShardMap(Of TKey)
Dim key As TKey
Dim rangeMapping As RangeMapping(Of TKey)
Dim returnValue As Boolean

returnValue = instance.TryGetMappingForKey(key, rangeMapping)

Syntax

'Declaration
Public Function TryGetMappingForKey ( _
    key As TKey, _
    <OutAttribute> ByRef rangeMapping As RangeMapping(Of TKey) _
) As Boolean
public bool TryGetMappingForKey (
    TKey key,
    out RangeMapping<TKey> rangeMapping
)
public:
bool TryGetMappingForKey (
    TKey key, 
    [OutAttribute] RangeMapping<TKey>^% rangeMapping
)
public boolean TryGetMappingForKey (
    TKey key, 
    /** @attribute OutAttribute() */ /** @ref */ RangeMapping<TKey> rangeMapping
)

Parameters

  • key
    Input key value.
  • rangeMapping
    Mapping that contains the key value.

Return Value

true if mapping is found, false otherwise.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also

Reference

RangeShardMap Class
RangeShardMap Members
Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement Namespace