ZooKeeperBasedMembershipTable.InsertRow(MembershipEntry, TableVersion) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
- New MembershipEntry will be added to the table.
- The newly added MembershipEntry will also be added with the new unique automatically generated eTag.
- TableVersion.Version in the table will be updated to the new TableVersion.Version.
- 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:
- A MembershipEntry for a given silo already exist in the table
- 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>
override this.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.