开始一个异步操作:在表或表组上开始一个事务(Transaction),并得到该事务ID。
Namespace: Aliyun.OpenServices.OpenTableService
Assembly: Aliyun.OpenServices (in Aliyun.OpenServices.dll) Version: 1.0.5290.21916
Syntax
public IAsyncResult BeginStartTransaction( string entityName, PartitionKeyValue partitionKeyValue, AsyncCallback callback, Object state )
Parameters
- entityName
- Type: SystemString
表(Table)名或表组(Table Group)名。 - partitionKeyValue
- Type: Aliyun.OpenServices.OpenTableServicePartitionKeyValue
表示事务(Transaction)建立在哪个数据分片键(Partition Key)上。 - callback
- Type: SystemAsyncCallback
AsyncCallback委托。 - state
- Type: SystemObject
此请求的状态对象。
Return Value
Type: IAsyncResult引用该异步请求的IAsyncResult对象。
Implements
IOtsBeginStartTransaction(String, PartitionKeyValue, AsyncCallback, Object)Exceptions
Exception | Condition |
---|---|
ArgumentException | entityName为空引用或空字符串 - 或 - entityName违反OTS名称的命名规范。 |
Remarks
用户必须指定数据分片键,并保证所有在这个事务中的操作的数据分片键的值等于在此API中指定的数据分片键的值。
若此数据分片键已经存在另一个事务中且该事务没有完成或被取消,则本次事务会直接失败,用户可以重试。
See Also