RangeShardMap<KeyT> Class

Definition

Represents a shard map of ranges. .

public class RangeShardMap<KeyT> extends ShardMap
Type Parameters
KeyT
Inheritance
java.lang.Object
Cloneable
RangeShardMap<KeyT>

Inherited Members

Constructors

RangeShardMap(ShardMapManager shardMapManager, StoreShardMap ssm)

Constructs a new instance.

Methods

clone()

Clones the given range shard map.

cloneCore()

Clones the current shard map instance.

createRangeMapping(Range range, Shard shard)

Creates and adds a range mapping to ShardMap.

createRangeMapping(RangeMappingCreationInfo creationInfo)

Creates and adds a range mapping to ShardMap.

deleteMapping(RangeMapping mapping)

Removes a range mapping.

deleteMapping(RangeMapping mapping, MappingLockToken mappingLockToken)

Removes a range mapping.

getMapper()

Gets the mapper. This method is used by OpenConnection/Lookup of V.

getMappingForKey(KeyT key)

Looks up the key value and returns the corresponding mapping.

getMappingForKey(KeyT key, LookupOptions lookupOptions)

Looks up the key value and returns the corresponding mapping.

getMappingLockOwner(RangeMapping mapping)

Gets the lock owner id of the specified mapping.

getMappings()

Gets all the range mappings for the shard map.

getMappings(LookupOptions lookupOptions)

Gets all the range mappings for the shard map.

getMappings(Range range)

Gets all the range mappings that exist within given range.

getMappings(Range range, LookupOptions lookupOptions)

Gets all the range mappings that exist within given range.

getMappings(Range range, Shard shard)

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

getMappings(Range range, Shard shard, LookupOptions lookupOptions)

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

getMappings(Shard shard)

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

getMappings(Shard shard, LookupOptions lookupOptions)

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

lockMapping(RangeMapping mapping, MappingLockToken mappingLockToken)

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

markMappingOffline(RangeMapping mapping)

Marks the specified mapping offline.

markMappingOffline(RangeMapping mapping, MappingLockToken mappingLockToken)

Marks the specified mapping offline.

markMappingOnline(RangeMapping mapping)

Marks the specified mapping online.

markMappingOnline(RangeMapping mapping, MappingLockToken mappingLockToken)

Marks the specified mapping online.

mergeMappings(RangeMapping left, RangeMapping right)

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 left, RangeMapping right, MappingLockToken leftMappingLockToken, MappingLockToken rightMappingLockToken)

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

splitMapping(RangeMapping existingMapping, KeyT splitAt)

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 existingMapping, KeyT splitAt, MappingLockToken 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.

tryGetMappingForKey(KeyT key, LookupOptions lookupOptions, ReferenceObjectHelper<RangeMapping> rangeMapping)

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

tryGetMappingForKey(KeyT key, ReferenceObjectHelper<RangeMapping> rangeMapping)

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

unlockMapping(MappingLockToken mappingLockToken)

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

unlockMapping(RangeMapping mapping, MappingLockToken mappingLockToken)

Unlocks the specified mapping

updateMapping(RangeMapping currentMapping, RangeMappingUpdate update)

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

updateMapping(RangeMapping currentMapping, RangeMappingUpdate update, MappingLockToken mappingLockToken)

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

Applies to