次の方法で共有


PointMapping Class

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
PointMapping 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.

ShardKey getKey()
MappingKind 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.

ShardMapManager getShardMapManager()

ShardMapManager for the object.

MappingStatus getStatus()

Gets Status of the mapping.

StoreMapping 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:

shardMapManager - Owning ShardMapManager.
creationInfo - Mapping creation information.

PointMapping

public PointMapping(ShardMapManager shardMapManager, ShardMap shardMap, StoreMapping mapping)

Internal constructor used for deserialization from store representation of the mapping object.

Parameters:

shardMapManager - Owning ShardMapManager.
shardMap - Owning shard map.
mapping - Storage representation of the mapping.

Method Details

clone

public PointMapping clone()

Clones the instance.

Returns:

clone of the instance.

equals

public boolean equals(Object obj)

Determines whether the specified object is equal to the current object.

Parameters:

obj - The object to compare with the current object.

Returns:

True if the specified object is equal to the current object; otherwise, false.

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:

Hash code for the object.

setKey

public void setKey(ShardKey value)

Parameters:

value

setManager

public void setManager(ShardMapManager value)

Parameters:

value

toString

public String toString()

Converts the object to its string representation.

Returns:

String representation of the object.

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:

shardMap - Shard map to which the shard provider belongs.
conn - Connection used for validation.

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:

shardMap - Shard map to which the shard provider belongs.
conn - Connection used for validation.

Returns:

A task to await validation completion

Applies to