Edit

Share via


IMembershipTable Interface

Definition

Interface for Membership Table.

public interface IMembershipTable
type IMembershipTable = interface
Public Interface IMembershipTable
Derived

Methods

CleanupDefunctSiloEntries(DateTimeOffset)

Delete all dead silo entries older than beforeDate

DeleteMembershipTableEntries(String)

Deletes all table entries of the given clusterId

InitializeMembershipTable(Boolean)

Initializes the membership table, will be called before all other methods

InitializeMembershipTable(GlobalConfiguration, Boolean, Logger)

Initializes the membership table, will be called before all other methods

InsertRow(MembershipEntry, TableVersion)

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.
ReadAll()

Atomically reads the full content of the Membership Table. The returned MembershipTableData includes all MembershipEntry entry for all silos in the table and the TableVersion for this table. The MembershipEntries and the TableVersion have to be read atomically.

ReadRow(SiloAddress)

Atomically reads the Membership Table information about a given silo. The returned MembershipTableData includes one MembershipEntry entry for a given silo and the TableVersion for this table. The MembershipEntry and the TableVersion have to be read atomically.

UpdateIAmAlive(MembershipEntry)

Updates the IAmAlive part (column) of the MembershipEntry for this silo. This operation should only update the IAmAlive column and not change other columns. This operation is a "dirty write" or "in place update" and is performed without etag validation. With regards to eTags update: This operation may automatically update the eTag associated with the given silo row, but it does not have to. It can also leave the etag not changed ("dirty write"). With regards to TableVersion: this operation should not change the TableVersion of the table. It should leave it untouched. There is no scenario where this operation could fail due to table semantical reasons. It can only fail due to network problems or table unavailability.

UpdateRow(MembershipEntry, String, TableVersion)

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.

Applies to