Method AddReplicaWithCompletionAsync
AddReplicaWithCompletionAsync(String, Region, AddReplicaOptions, CancellationToken)
Declaration
public Task<TableResult> AddReplicaWithCompletionAsync(string tableName, Region region, AddReplicaOptions options = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | tableName | Name of the table. |
Region | region | Region where to add the replica. |
AddReplicaOptions | options | (Optional) Options for the operation. If not
specified or null , appropriate defaults will be used.
|
CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
Type | Description |
---|---|
Task<TableResult> | Task returning TableResult. |
Remarks
This method is equivalent to calling AddReplicaAsync(String, Region, AddReplicaOptions, CancellationToken) and then calling WaitForCompletionAsync(Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken) on the returned TableResult object. If the operation is successful, the table state in the resulting TableResult object should be Active.
For this operation, Timeout covers the total time interval including waiting for the DDL operation completion. If not specified, separate default timeouts are used for issuing the operation and waiting for its completion, with values of TableDDLTimeout and TablePollTimeout correspondingly (the latter defaults to no timeout if TablePollTimeout is not set). Note that as with WaitForCompletionAsync(Nullable<TimeSpan>, Nullable<TimeSpan>, CancellationToken) you may specify poll delay as PollDelay which otherwise defaults to TablePollDelay.
Exceptions
Type | Condition |
---|---|
TimeoutException | Operation has timed out. |
InvalidOperationException | The table or the service is not in a valid state to perform this operation. |
NoSQLException | NoSQLException or one of its subclasses is thrown if operation cannot be performed for any other reason. See documentation for corresponding subclass of NoSQLException. |
See Also
AddReplicaWithCompletionAsync(String, String, AddReplicaOptions, CancellationToken)
Declaration
public Task<TableResult> AddReplicaWithCompletionAsync(string tableName, string regionId, AddReplicaOptions options = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
String | tableName | Name of the table. |
String | regionId | Region id of the region where to add the replica. |
AddReplicaOptions | options | (Optional) Options for the operation. If not
specified or null , appropriate defaults will be used.
|
CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
Type | Description |
---|---|
Task<TableResult> | Task returning TableResult. |
Remarks
regionId
parameter instead of Region instance. E.g.
"ap-mumbai-1", "us-ashburn-1", etc.
Exceptions
Type | Condition |
---|---|
TimeoutException | Operation has timed out. |
InvalidOperationException | The table or the service is not in a valid state to perform this operation. |
NoSQLException | NoSQLException or one of its subclasses is thrown if operation cannot be performed for any other reason. See documentation for corresponding subclass of NoSQLException. |