ListShardMap<KeyT> Class
- java.
lang. Object - Cloneable
- ShardMap
- com.
microsoft. azure. elasticdb. shard. map. ListShardMap<KeyT>
- com.
Type Parameters
- KeyT
public class ListShardMap extends ShardMap
Represents a shard map of points where points are of the specified key.
Constructor Summary
Constructor | Description |
---|---|
List |
Constructs a new instance. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Shard |
clone()
Clones the specified shard map. |
Shard |
clone Clones the current shard map instance. |
Point |
create Creates and adds a point mapping to ShardMap. |
Point |
create Creates and adds a point mapping to ShardMap. |
void |
delete Removes a point mapping. |
<V> IShard |
get Gets the mapper. This method is used by OpenConnection/Lookup of V. |
Point |
get Looks up the key value and returns the corresponding mapping. Only the global shard map store is searched, not the local cache. This is equivalent to . |
Point |
get Looks up the key value and returns the corresponding mapping. |
Mapping |
get Gets the lock owner id of the specified mapping. |
List<Point |
get Gets all the point mappings for the shard map. |
List<Point |
get Gets all the point mappings for the shard map. |
List<Point |
get Gets all the mappings that exist within given range. |
List<Point |
get Gets all the mappings that exist within given range. |
List<Point |
get Gets all the mappings that exist within given range and given shard. |
List<Point |
get Gets all the mappings that exist within given range and given shard. |
List<Point |
get Gets all the mappings that exist for the given shard. |
List<Point |
get Gets all the mappings that exist for the given shard. |
void |
lock Locks the mapping for the specified owner The state of a locked mapping can only be modified by the lock owner. |
Point |
mark Marks the specified mapping offline. |
Point |
mark Marks the specified mapping online. |
boolean |
try Tries to looks up the key value and place the corresponding mapping in pointMapping . |
boolean |
try Tries to looks up the key value and place the corresponding mapping in pointMapping . Only the global shard map store is searched, not local cache. This is equivalent to . |
void |
unlock Unlocks all mappings in this map that belong to the given MappingLockToken. |
void |
unlock Unlocks the specified mapping |
Point |
update Updates a PointMapping<KeyT> with the updates provided in the update parameter. |
Point |
update Updates a point mapping with the changes provided in the update parameter. |
Inherited Members
Constructor Details
ListShardMap
public ListShardMap(ShardMapManager shardMapManager, StoreShardMap ssm)
Constructs a new instance.
Parameters:
Method Details
clone
public ShardMap clone()
Clones the specified shard map.
Returns:
cloneCore
protected ShardMap cloneCore()
Clones the current shard map instance.
Returns:
createPointMapping
public PointMapping createPointMapping(KeyT point, Shard shard)
Creates and adds a point mapping to ShardMap.
Parameters:
Returns:
createPointMapping
public PointMapping createPointMapping(PointMappingCreationInfo creationInfo)
Creates and adds a point mapping to ShardMap.
Parameters:
Returns:
deleteMapping
public void deleteMapping(PointMapping mapping)
Removes a point mapping.
Parameters:
getMapper
public
Gets the mapper. This method is used by OpenConnection/Lookup of V.
Returns:
getMappingForKey
public PointMapping getMappingForKey(KeyT key)
Looks up the key value and returns the corresponding mapping. Only the global shard map store is searched, not the local cache. This is equivalent to .
Parameters:
Returns:
getMappingForKey
public PointMapping getMappingForKey(KeyT key, LookupOptions lookupOptions)
Looks up the key value and returns the corresponding mapping.
Parameters:
Returns:
getMappingLockOwner
public MappingLockToken getMappingLockOwner(PointMapping mapping)
Gets the lock owner id of the specified mapping.
Parameters:
Returns:
getMappings
public List
Gets all the point mappings for the shard map.
Returns:
getMappings
public List
Gets all the point mappings for the shard map.
Parameters:
Returns:
getMappings
public List
Gets all the mappings that exist within given range.
Parameters:
Returns:
getMappings
public List
Gets all the mappings that exist within given range.
Parameters:
Returns:
getMappings
public List
Gets all the mappings that exist within given range and given shard.
Parameters:
Returns:
getMappings
public List
Gets all the mappings that exist within given range and given shard.
Parameters:
Returns:
getMappings
public List
Gets all the mappings that exist for the given shard.
Parameters:
Returns:
getMappings
public List
Gets all the mappings that exist for the given shard.
Parameters:
Returns:
lockMapping
public void lockMapping(PointMapping mapping, MappingLockToken mappingLockToken)
Locks the mapping for the specified owner The state of a locked mapping can only be modified by the lock owner.
Parameters:
markMappingOffline
public PointMapping markMappingOffline(PointMapping mapping)
Marks the specified mapping offline.
Parameters:
Returns:
markMappingOnline
public PointMapping markMappingOnline(PointMapping mapping)
Marks the specified mapping online.
Parameters:
Returns:
tryGetMappingForKey
public boolean tryGetMappingForKey(KeyT key, LookupOptions lookupOptions, ReferenceObjectHelper
Tries to looks up the key value and place the corresponding mapping in pointMapping .
Parameters:
Returns:
true
if mapping is found, false
otherwise.
tryGetMappingForKey
public boolean tryGetMappingForKey(KeyT key, ReferenceObjectHelper
Tries to looks up the key value and place the corresponding mapping in pointMapping . Only the global shard map store is searched, not local cache. This is equivalent to .
Parameters:
Returns:
true
if mapping is found, false
otherwise.
unlockMapping
public void unlockMapping(MappingLockToken mappingLockToken)
Unlocks all mappings in this map that belong to the given MappingLockToken.
Parameters:
unlockMapping
public void unlockMapping(PointMapping mapping, MappingLockToken mappingLockToken)
Unlocks the specified mapping
Parameters:
updateMapping
public PointMapping updateMapping(PointMapping currentMapping, PointMappingUpdate update)
Updates a PointMapping<KeyT> with the updates provided in the update parameter.
Parameters:
Returns:
updateMapping
public PointMapping updateMapping(PointMapping currentMapping, PointMappingUpdate update, MappingLockToken mappingLockToken)
Updates a point mapping with the changes provided in the update parameter.
Parameters:
Returns:
Azure SDK for Java feedback
Azure SDK for Java is an open source project. Select a link to provide feedback: