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

KeyValueStoreReplica.TryUpdate 方法

定义

重载

TryUpdate(TransactionBase, String, Byte[])

尝试更新由指定键编制索引的值。

TryUpdate(TransactionBase, String, Byte[], Int64)

尝试更新由指定键编制索引的值。

TryUpdate(TransactionBase, String, Byte[])

尝试更新由指定键编制索引的值。

public bool TryUpdate (System.Fabric.TransactionBase transactionBase, string key, byte[] value);
member this.TryUpdate : System.Fabric.TransactionBase * string * byte[] -> bool
Public Function TryUpdate (transactionBase As TransactionBase, key As String, value As Byte()) As Boolean

参数

transactionBase
TransactionBase

事务实例。

key
String

要更新的值的键或索引, (作为字符串) 。 长度限制为 800 个字符。

value
Byte[]

值 (作为要存储的字节数组) ,长度限制为 2GB。

返回

如果找到并更新了指定的键,则为 True。 如果指定的键不存在,则为 False。

适用于

TryUpdate(TransactionBase, String, Byte[], Int64)

尝试更新由指定键编制索引的值。

public bool TryUpdate (System.Fabric.TransactionBase transactionBase, string key, byte[] value, long checkSequenceNumber);
member this.TryUpdate : System.Fabric.TransactionBase * string * byte[] * int64 -> bool
Public Function TryUpdate (transactionBase As TransactionBase, key As String, value As Byte(), checkSequenceNumber As Long) As Boolean

参数

transactionBase
TransactionBase

事务实例。

key
String

要更新的值的键或索引, (作为字符串) 。 长度限制为 800 个字符。

value
Byte[]

值 (作为要存储的字节数组) ,长度限制为 2GB。

checkSequenceNumber
Int64

要更新的密钥的预期序列号。

返回

如果找到并更新了指定的键,则为 True。 如果指定的键不存在,则为 False。

适用于