ShardMapManager Class

Definition

Serves as the entry point for creation, management and lookup operations over shard maps.

public class ShardMapManager
Inheritance
java.lang.Object
ShardMapManager

Constructors

ShardMapManager(SqlShardMapManagerCredentials credentials, IStoreConnectionFactory storeConnectionFactory, IStoreOperationFactory storeOperationFactory, ICacheStore cacheStore, ShardMapManagerLoadPolicy loadPolicy, RetryPolicy retryPolicy, RetryBehavior retryBehavior)

Given the connection string, opens up the corresponding data source and obtains the ShardMapManager.

ShardMapManager(SqlShardMapManagerCredentials credentials, IStoreConnectionFactory storeConnectionFactory, IStoreOperationFactory storeOperationFactory, ICacheStore cacheStore, ShardMapManagerLoadPolicy loadPolicy, RetryPolicy retryPolicy, RetryBehavior retryBehavior, EventHandler<RetryingEventArgs> retryEventHandler)

Given the connection string, opens up the corresponding data source and obtains the ShardMapManager.

Fields

shardMapManagerRetrying

Event to be raised on Shard Map Manager store retries.

Methods

createListShardMap(String shardMapName, ShardKeyType keyType)

Creates a list based ListShardMap<KeyT>.

createRangeShardMap(String shardMapName, ShardKeyType keyType)

Create a range based RangeShardMap<KeyT>.

deleteShardMap(ShardMap shardMap)

Removes the specified shard map.

getCache()
getCredentials()
getDistinctShardLocations()

Obtains distinct shard locations from the shard map manager.

getListShardMap(String shardMapName, ShardKeyType keyType)

Obtains a ListShardMap<KeyT> given the name.

getRangeShardMap(String shardMapName, ShardKeyType keyType)

Obtains a RangeShardMap<KeyT> given the name.

getRecoveryManager()

Obtains the recovery manager for the current shard map manager instance.

getRetryPolicy()
getSchemaInfoCollection()

Obtains the schema info collection object for the current shard map manager instance.

getShardMap(String shardMapName)

Obtains a ShardMap given the name.

getShardMaps()

Obtains all shard maps associated with the shard map manager.

getStoreConnectionFactory()
getStoreOperationFactory()
lookupShardMapByName(String operationName, String shardMapName, boolean lookInCacheFirst)

Finds a shard map from cache if requested and if necessary from global shard map.

onShardMapManagerRetryingEvent(RetryingEventArgs arg)

Publisher for ShardMapManagerRetryingEvent event.

shardMapManagerRetryingEventHandler(Object sender, RetryingEventArgs arg)

Subscriber function to RetryPolicy.retrying event.

tryGetListShardMap(String shardMapName, ShardKeyType keyType, ReferenceObjectHelper<ListShardMap<KeyT>> shardMap)

Tries to obtains a ListShardMap<KeyT> given the name.

tryGetRangeShardMap(String shardMapName, ShardKeyType keyType, ReferenceObjectHelper<RangeShardMap<KeyT>> shardMap)

Tries to obtains a RangeShardMap<KeyT> given the name.

tryGetShardMap(String shardMapName, ShardKeyType keyType, ReferenceObjectHelper<ShardMap> shardMap)

Tries to obtains a ShardMap given the name.

upgradeGlobalStore()

Upgrades store hosting global shard map to the latest version supported by library.

upgradeGlobalStore(Version targetVersion)

Upgrades store hosting global shard map to specified version. This will be used for upgrade testing.

upgradeLocalStore(ShardLocation location)

Upgrades store location to the latest version supported by library.

upgradeLocalStore(ShardLocation location, Version targetVersion)

Upgrades store location to the specified version. This will be used for upgrade testing.

Applies to