ShardLocation Class

Definition

  • java.lang.Object
    • Serializable
      • com.microsoft.azure.elasticdb.shard.base.ShardLocation

Represents the location of a shard in terms of its server name and database name. This is used to manage connections to the shard and to support other operations on shards. As opposed to a Shard, a shard location is not registered with the shard map.

public class ShardLocation

Constructors

ShardLocation()
ShardLocation(String server, String database)

Constructor that allows specification of address and database to identify a shard.

ShardLocation(String server, String database, SqlProtocol protocol)

Constructor that allows specification of address and database to identify a shard.

ShardLocation(String server, String database, SqlProtocol protocol, int port)

Constructor that allows specification of protocol, address, port and database to identify a shard.

Methods

equals(Object obj)

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

equals(ShardLocation other)

Performs equality comparison with another given ShardLocation.

getDatabase()
getDataSource()

DataSource name which can be used to construct connection string Data Source property.

getPort()
getProtocol()
getServer()
hashCode()

Calculates the hash code for this instance.

toString()

Converts the shard location to its string representation.

Applies to