你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ShardMapManagerFactory Class

  • java.lang.Object
    • com.microsoft.azure.elasticdb.shard.mapmanager.ShardMapManagerFactory

public class ShardMapManagerFactory

Factory for ShardMapManagers facilitates the creation and management of shard map manager persistent state. Use this class as the entry point to the library's object hierarchy.

Method Summary

Modifier and Type Method and Description
ShardMapManager createSqlShardMapManager(String connectionString)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with KeepExisting and RetryBehavior.DefaultRetryBehavior.

ShardMapManager createSqlShardMapManager(String connectionString, RetryBehavior retryBehavior)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with KeepExisting.

ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with RetryBehavior.DefaultRetryBehavior.

ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode, RetryBehavior retryBehavior)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database.

ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode, RetryBehavior retryBehavior, EventHandler<RetryingEventArgs> retryEventHandler)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database.

ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode, Version targetVersion)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with getDefaultRetryPolicy().

ShardMapManager getSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy)

Gets ShardMapManager from persisted state in a SQL Server database, with RetryBehavior.DefaultRetryBehavior.

ShardMapManager getSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior)

Gets ShardMapManager from persisted state in a SQL Server database.

ShardMapManager getSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler<RetryingEventArgs> retryEventHandler)

Gets ShardMapManager from persisted state in a SQL Server database.

boolean tryGetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, ReferenceObjectHelper<ShardMapManager> shardMapManager)

Gets ShardMapManager from persisted state in a SQL Server database.

boolean tryGetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler<RetryingEventArgs> retryEventHandler, ReferenceObjectHelper<ShardMapManager> shardMapManager)

Gets ShardMapManager from persisted state in a SQL Server database.

boolean tryGetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, ReferenceObjectHelper<ShardMapManager> shardMapManager)

Gets ShardMapManager from persisted state in a SQL Server database.

Method Details

createSqlShardMapManager

public static ShardMapManager createSqlShardMapManager(String connectionString)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with KeepExisting and RetryBehavior.DefaultRetryBehavior.

Parameters:

connectionString - Connection parameters used for creating shard map manager database.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

createSqlShardMapManager

public static ShardMapManager createSqlShardMapManager(String connectionString, RetryBehavior retryBehavior)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with KeepExisting.

Parameters:

connectionString - Connection parameters used for creating shard map manager database.
retryBehavior - Behavior for detecting transient exceptions in the store.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

createSqlShardMapManager

public static ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with RetryBehavior.DefaultRetryBehavior.

Parameters:

connectionString - Connection parameters used for creating shard map manager database.
createMode - Describes the option selected by the user for creating shard map manager database.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

createSqlShardMapManager

public static ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode, RetryBehavior retryBehavior)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database.

Parameters:

connectionString - Connection parameters used for creating shard map manager database.
createMode - Describes the option selected by the user for creating shard map manager database.
retryBehavior - Behavior for detecting transient exceptions in the store.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

createSqlShardMapManager

public static ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode, RetryBehavior retryBehavior, EventHandler retryEventHandler)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database.

Parameters:

connectionString - Connection parameters used for creating shard map manager database.
createMode - Describes the option selected by the user for creating shard map manager database.
retryBehavior - Behavior for detecting transient exceptions in the store.
retryEventHandler - Event handler for store operation retry events.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

createSqlShardMapManager

public static ShardMapManager createSqlShardMapManager(String connectionString, ShardMapManagerCreateMode createMode, Version targetVersion)

Creates a ShardMapManager and its corresponding storage structures in the specified SQL Server database, with getDefaultRetryPolicy().

Parameters:

connectionString - Connection parameters used for creating shard map manager database.
createMode - Describes the option selected by the user for creating shard map manager database.
targetVersion - Target version of store to create.

getSqlShardMapManager

public static ShardMapManager getSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy)

Gets ShardMapManager from persisted state in a SQL Server database, with RetryBehavior.DefaultRetryBehavior.

Parameters:

connectionString - Connection parameters used for performing operations against shard map manager database(s).
loadPolicy - Initialization policy.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

getSqlShardMapManager

public static ShardMapManager getSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior)

Gets ShardMapManager from persisted state in a SQL Server database.

Parameters:

connectionString - Connection parameters used for performing operations against shard map manager database(s).
loadPolicy - Initialization policy.
retryBehavior - Behavior for detecting transient exceptions in the store.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

getSqlShardMapManager

public static ShardMapManager getSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler retryEventHandler)

Gets ShardMapManager from persisted state in a SQL Server database.

Parameters:

connectionString - Connection parameters used for performing operations against shard map manager database(s).
loadPolicy - Initialization policy.
retryBehavior - Behavior for detecting transient exceptions in the store.
retryEventHandler - Event handler for store operation retry events.

Returns:

A shard map manager object used for performing management and read operations for shard maps, shards and shard mappings.

tryGetSqlShardMapManager

public static boolean tryGetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, ReferenceObjectHelper shardMapManager)

Gets ShardMapManager from persisted state in a SQL Server database.

Parameters:

connectionString - Connection parameters used for performing operations against shard map manager database(s).
loadPolicy - Initialization policy.
shardMapManager - Shard map manager object used for performing management and read operations for shard maps, shards and shard mappings or null in case shard map manager does not exist.

Returns:

true if a shard map manager object was created, false otherwise.

tryGetSqlShardMapManager

public static boolean tryGetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler retryEventHandler, ReferenceObjectHelper shardMapManager)

Gets ShardMapManager from persisted state in a SQL Server database.

Parameters:

connectionString - Connection parameters used for performing operations against shard map manager database(s).
loadPolicy - Initialization policy.
retryBehavior - Behavior for detecting transient exceptions in the store.
retryEventHandler - Event handler for store operation retry events.
shardMapManager - Shard map manager object used for performing management and read operations for shard maps, shards and shard mappings or null in case shard map manager does not exist.

Returns:

true if a shard map manager object was created, false otherwise.

tryGetSqlShardMapManager

public static boolean tryGetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, ReferenceObjectHelper shardMapManager)

Gets ShardMapManager from persisted state in a SQL Server database.

Parameters:

connectionString - Connection parameters used for performing operations against shard map manager database(s).
loadPolicy - Initialization policy.
retryBehavior - Behavior for detecting transient exceptions in the store.
shardMapManager - Shard map manager object used for performing management and read operations for shard maps, shards and shard mappings or null in case shard map manager does not exist.

Returns:

true if a shard map manager object was created, false otherwise.

Applies to