Redigera

Dela via


IMembershipTable.InsertRow(MembershipEntry, TableVersion) Method

Definition

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

  1. New MembershipEntry will be added to the table.
  2. The newly added MembershipEntry will also be added 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, insert 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 already exist in the table
  6. 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> InsertRow (Orleans.MembershipEntry entry, Orleans.TableVersion tableVersion);
abstract member InsertRow : Orleans.MembershipEntry * Orleans.TableVersion -> System.Threading.Tasks.Task<bool>
Public Function InsertRow (entry As MembershipEntry, tableVersion As TableVersion) As Task(Of Boolean)

Parameters

entry
MembershipEntry

MembershipEntry to be inserted.

tableVersion
TableVersion

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

Returns

True if the insert operation succeeded and false otherwise.

Applies to