Bewerken

Delen via


IMembershipTable.UpdateRow(MembershipEntry, String, TableVersion) Method

Definition

Atomically tries to update the MembershipEntry for one silo and also update the TableVersion. If operation succeeds, the following changes would be made to the table:

  1. The MembershipEntry for this silo will be updated to the new MembershipEntry (the old entry will be fully substituted by the new entry)
  2. The eTag for the updated MembershipEntry will also be eTag with the new unique automatically generated eTag.
  3. TableVersion.Version in the table will be updated to the new TableVersion.Version.
  4. TableVersion etag in the table will be updated to the new unique automatically generated eTag. All those changes to the table, update of a new row and update of the table version and the associated etags, should happen atomically, or fail atomically with no side effects. The operation should fail in each of the following conditions:
  5. A MembershipEntry for a given silo does not exist in the table
  6. A MembershipEntry for a given silo exist in the table but its etag in the table does not match the provided etag.
  7. Update of the TableVersion failed since the given TableVersion etag (as specified by the TableVersion.VersionEtag property) did not match the TableVersion etag in the table.
public System.Threading.Tasks.Task<bool> UpdateRow (Orleans.MembershipEntry entry, string etag, Orleans.TableVersion tableVersion);
abstract member UpdateRow : Orleans.MembershipEntry * string * Orleans.TableVersion -> System.Threading.Tasks.Task<bool>
Public Function UpdateRow (entry As MembershipEntry, etag As String, tableVersion As TableVersion) As Task(Of Boolean)

Parameters

entry
MembershipEntry

MembershipEntry to be updated.

etag
String

The etag for the given MembershipEntry.

tableVersion
TableVersion

The new TableVersion for this table, along with its etag.

Returns

True if the update operation succeeded and false otherwise.

Applies to