PointMapping Class
- java.
lang. Object - IShardProvider<ValueT>
- com.
microsoft. azure. elasticdb. shard. base. PointMapping
- com.
public class PointMapping implements IShardProvider,IMappingInfoProvider
Represents a mapping between the singleton key value of a shardlet (a point) and a Shard.
Constructor Summary
Constructor | Description |
---|---|
PointMapping(ShardMapManager shardMapManager, PointMappingCreationInfo creationInfo) |
Constructs a point mapping given mapping creation arguments. |
PointMapping(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 |
---|---|
Point |
clone()
Clones the instance. |
boolean |
equals(Object obj)
Determines whether the specified object is equal to the current object. |
UUID |
getId()
Identity of the mapping. |
Shard |
getKey() |
Mapping |
getKind()
Type of the mapping. |
Shard |
getShard()
Gets Shard that contains the key value. |
Shard |
getShardInfo()
Shard that contains the key value. |
UUID |
getShardMapId()
Identify of the ShardMap this shard belongs to. |
Shard |
getShardMapManager()
ShardMapManager for the object. |
Mapping |
getStatus()
Gets Status of the mapping. |
Store |
getStoreMapping()
Storage representation of the mapping. |
String |
getTypeName()
Mapping type, useful for diagnostics. |
Object | getValue() |
int |
hashCode()
Calculates the hash code for this instance. |
void | setKey(ShardKey value) |
void | setManager(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
PointMapping
public PointMapping(ShardMapManager shardMapManager, PointMappingCreationInfo creationInfo)
Constructs a point mapping given mapping creation arguments.
Parameters:
PointMapping
public PointMapping(ShardMapManager shardMapManager, ShardMap shardMap, StoreMapping mapping)
Internal constructor used for deserialization from store representation of the mapping object.
Parameters:
Method Details
clone
public PointMapping clone()
Clones the instance.
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.
getKey
public ShardKey getKey()
getKind
public MappingKind getKind()
Type of the mapping.
Overrides:
PointMapping.getKind()getShard
public Shard getShard()
Gets Shard that contains the key value.
getShardInfo
public Shard getShardInfo()
Shard that contains the key value.
getShardMapId
public UUID getShardMapId()
Identify of the ShardMap this shard belongs to.
Overrides:
PointMapping.getShardMapId()getShardMapManager
public ShardMapManager getShardMapManager()
ShardMapManager for the object.
Overrides:
PointMapping.getShardMapManager()getStatus
public MappingStatus getStatus()
Gets Status of the mapping.
getStoreMapping
public StoreMapping getStoreMapping()
Storage representation of the mapping.
Overrides:
PointMapping.getStoreMapping()getTypeName
public String getTypeName()
Mapping type, useful for diagnostics.
Overrides:
PointMapping.getTypeName()getValue
public Object getValue()
hashCode
public int hashCode()
Calculates the hash code for this instance.
Returns:
setKey
public void setKey(ShardKey value)
Parameters:
setManager
public void setManager(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: