SchemaInfoCollection Class
- java.
lang. Object - java.
util. ArrayList<Map. Entry<String, SchemaInfo>> - com.
microsoft. azure. elasticdb. shard. schema. SchemaInfoCollection
- com.
- java.
public class SchemaInfoCollection
Provides storage services to a client for storing or updating or retrieving schema information associated with a sharding scheme and assigning names to individual buckets of information. The class doesn't store the association between a sharding scheme and the metadata unit. It's the caller's responsibility to maintain the mapping.
Constructor Summary
Constructor | Description |
---|---|
SchemaInfoCollection(ShardMapManager shardMapManager) |
Constructs an instance of schema info collection. |
Method Summary
Modifier and Type | Method and Description |
---|---|
final void |
add(String shardMapName, SchemaInfo schemaInfo)
Adds a SchemaInfo that is associated with the given ShardMap name. The associated data contains information concerning sharded tables and reference tables. If you try to add a SchemaInfo with an existing name, a name-conflict exception will be thrown |
final Schema |
get(String shardMapName)
Fetches the SchemaInfo stored with the supplied ShardMap name. |
final Iterator<Map.Entry<String, Schema |
iterator()
Returns an enumerator that iterates through the SchemaInfoCollection. |
final void |
remove(String shardMapName)
Removes the SchemaInfo with the given ShardMap name. |
final void |
replace(String shardMapName, SchemaInfo schemaInfo)
Replaces the SchemaInfo with the given ShardMap name. |
final boolean |
tryGet(String shardMapName, ReferenceObjectHelper<SchemaInfo> schemaInfo)
Tries to fetch the SchemaInfo with the given ShardMap name without raising any exception if data doesn't exist. |
Constructor Details
SchemaInfoCollection
public SchemaInfoCollection(ShardMapManager shardMapManager)
Constructs an instance of schema info collection.
Parameters:
Method Details
add
public final void add(String shardMapName, SchemaInfo schemaInfo)
Adds a SchemaInfo that is associated with the given ShardMap name. The associated data contains information concerning sharded tables and reference tables. If you try to add a SchemaInfo with an existing name, a name-conflict exception will be thrown
Parameters:
get
public final SchemaInfo get(String shardMapName)
Fetches the SchemaInfo stored with the supplied ShardMap name.
Parameters:
Returns:
iterator
public final Iterator<>
Returns an enumerator that iterates through the SchemaInfoCollection.
Returns:
remove
public final void remove(String shardMapName)
Removes the SchemaInfo with the given ShardMap name.
Parameters:
replace
public final void replace(String shardMapName, SchemaInfo schemaInfo)
Replaces the SchemaInfo with the given ShardMap name.
Parameters:
tryGet
public final boolean tryGet(String shardMapName, ReferenceObjectHelper
Tries to fetch the SchemaInfo with the given ShardMap name without raising any exception if data doesn't exist.
Parameters:
Returns:
Applies to
Azure SDK for Java
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour