RangeMapping Class
- java.
lang. Object - IShardProvider<ValueT>
- com.
microsoft. azure. elasticdb. shard. base. RangeMapping
- com.
public class RangeMapping implements IShardProvider,IMappingInfoProvider
Represents a mapping between a range of key values and a Shard.
Constructor Summary
Constructor | Description |
---|---|
RangeMapping(ShardMapManager shardMapManager, RangeMappingCreationInfo creationInfo) |
Constructs a range mapping given mapping creation arguments. |
RangeMapping(ShardMapManager shardMapManager, ShardMap shardMap, StoreMapping mapping) |
Internal constructor used for deserialization from store representation of the mapping object. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Range |
clone()
Clones the instance which implements the interface. |
boolean |
equals(Object obj)
Determines whether the specified object is equal to the current object. |
UUID |
getId()
Identity of the mapping. |
Mapping |
getKind()
Type of the mapping. |
Shard |
getRange() |
Shard |
getShard()
Gets Shard that contains the range of values. |
Shard |
getShardInfo()
Shard that contains the range of values. |
UUID |
getShardMapId()
Identify of the ShardMap this shard belongs to. |
Shard |
getShardMapManager()
ShardMapManager for the object. |
Mapping |
getStatus()
Gets the MappingStatus of the mapping. |
Store |
getStoreMapping()
Storage representation of the mapping. |
String |
getTypeName()
Mapping type, useful for diagnostics. |
Range | getValue() |
int |
hashCode()
Calculates the hash code for this instance. |
void | setRange(ShardRange value) |
void | setShardMapManager(ShardMapManager value) |
String |
toString()
Converts the object to its string representation. |
void |
validate(StoreShardMap shardMap, Connection conn)
Performs validation that the local representation is as up-to-date as the representation on the backing data store. |
Callable |
validateAsync(StoreShardMap shardMap, Connection conn)
Asynchronously performs validation that the local representation is as up-to-date as the representation on the backing data store. |
Constructor Details
RangeMapping
public RangeMapping(ShardMapManager shardMapManager, RangeMappingCreationInfo creationInfo)
Constructs a range mapping given mapping creation arguments.
Parameters:
RangeMapping
public RangeMapping(ShardMapManager shardMapManager, ShardMap shardMap, StoreMapping mapping)
Internal constructor used for deserialization from store representation of the mapping object.
Parameters:
Method Details
clone
public RangeMapping clone()
Clones the instance which implements the interface.
Returns:
equals
public boolean equals(Object obj)
Determines whether the specified object is equal to the current object.
Parameters:
Returns:
getId
public UUID getId()
Identity of the mapping.
getKind
public MappingKind getKind()
Type of the mapping.
Overrides:
RangeMapping.getKind()getRange
public ShardRange getRange()
getShard
public Shard getShard()
Gets Shard that contains the range of values.
getShardInfo
public Shard getShardInfo()
Shard that contains the range of values.
getShardMapId
public UUID getShardMapId()
Identify of the ShardMap this shard belongs to.
Overrides:
RangeMapping.getShardMapId()getShardMapManager
public ShardMapManager getShardMapManager()
ShardMapManager for the object.
Overrides:
RangeMapping.getShardMapManager()getStatus
public MappingStatus getStatus()
Gets the MappingStatus of the mapping.
getStoreMapping
public StoreMapping getStoreMapping()
Storage representation of the mapping.
Overrides:
RangeMapping.getStoreMapping()getTypeName
public String getTypeName()
Mapping type, useful for diagnostics.
Overrides:
RangeMapping.getTypeName()getValue
public Range getValue()
hashCode
public int hashCode()
Calculates the hash code for this instance.
Returns:
setRange
public void setRange(ShardRange value)
Parameters:
setShardMapManager
public void setShardMapManager(ShardMapManager value)
Parameters:
toString
public String toString()
Converts the object to its string representation.
Returns:
validate
public void validate(StoreShardMap shardMap, Connection conn)
Performs validation that the local representation is as up-to-date as the representation on the backing data store.
Parameters:
validateAsync
public Callable validateAsync(StoreShardMap shardMap, Connection conn)
Asynchronously performs validation that the local representation is as up-to-date as the representation on the backing data store.
Parameters:
Returns: