Skip to content

IMembershipTable Methods

Interface for Membership Table.

CleanupDefunctSiloEntries(DateTimeOffset)

abstract
[System.Obsolete(Use CleanupDefunctSiloEntriesAsync instead.)]
public abstract Task CleanupDefunctSiloEntries(DateTimeOffset beforeDate)
Removes dead silo entries whose last known update precedes beforeDate.

Parameters

beforeDateDateTimeOffset
The exclusive upper bound for the last known update time of entries to delete.

Returns

A task representing the cleanup operation.

CleanupDefunctSiloEntriesAsync(DateTimeOffset, CancellationToken)

virtual
View source
[Orleans.Alias(7A519C2E)]
public virtual Task CleanupDefunctSiloEntriesAsync(DateTimeOffset beforeDate, CancellationToken cancellationToken = default(CancellationToken))
Removes dead silo entries whose last known update precedes beforeDate.

Parameters

beforeDateDateTimeOffset
The exclusive upper bound for the last update time of entries to delete.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

A task representing the cleanup operation.

DeleteMembershipTableEntries(string)

abstract
[System.Obsolete(Use DeleteMembershipTableEntriesAsync instead.)]
public abstract Task DeleteMembershipTableEntries(string clusterId)
Deletes all table entries of the given clusterId

Parameters

clusterIdstring
The identifier of the cluster whose entries are deleted.

Returns

A task representing the deletion operation.

DeleteMembershipTableEntriesAsync(string, CancellationToken)

virtual
View source
[Orleans.Alias(BF899C85)]
public virtual Task DeleteMembershipTableEntriesAsync(string clusterId, CancellationToken cancellationToken = default(CancellationToken))
Deletes all table entries of the given clusterId

Parameters

clusterIdstring
The cluster whose entries are deleted.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

A task representing the deletion operation.

InitializeMembershipTable(bool)

abstract
[System.Obsolete(Use InitializeMembershipTableAsync instead.)]
public abstract Task InitializeMembershipTable(bool tryInitTableVersion)
Initializes the membership table, will be called before all other methods

Parameters

tryInitTableVersionbool
whether an attempt will be made to init the underlying table

Returns

A task representing the initialization operation.

InitializeMembershipTableAsync(bool, CancellationToken)

virtual
View source
[Orleans.Alias(FB89E5E9)]
public virtual Task InitializeMembershipTableAsync(bool tryInitTableVersion, CancellationToken cancellationToken = default(CancellationToken))
Initializes the membership table, will be called before all other methods

Parameters

tryInitTableVersionbool
Whether to initialize the underlying table version.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

A task representing the initialization operation.

InsertRow(MembershipEntry, TableVersion)

abstract
[System.Obsolete(Use InsertRowAsync instead.)]
public abstract Task<bool> InsertRow(MembershipEntry entry, TableVersion 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 have a provider-defined row 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: 1) A MembershipEntry for a given silo already exist in the table 2) 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.

Parameters

entryMembershipEntry
MembershipEntry to be inserted.
tableVersionTableVersion
The new TableVersion for this table, along with its etag.

Returns

True if the insert operation succeeded and false otherwise.

InsertRowAsync(MembershipEntry, TableVersion, CancellationToken)

virtual
View source
[Orleans.Alias(FEF3AC5A)]
public virtual Task<bool> InsertRowAsync(MembershipEntry entry, TableVersion tableVersion, CancellationToken cancellationToken = default(CancellationToken))
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 have a provider-defined row 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: 1) A MembershipEntry for a given silo already exist in the table 2) 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.

Parameters

entryMembershipEntry
The membership entry to insert.
tableVersionTableVersion
The new table version and its expected etag.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

True if the insert operation succeeded and false otherwise.

ReadAll

abstract
[System.Obsolete(Use ReadAllAsync instead.)]
public abstract Task<MembershipTableData> 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.

Returns

The membership information for a given table: MembershipTableData consisting multiple MembershipEntry entries and TableVersion, all read atomically.

ReadAllAsync(CancellationToken)

virtual
View source
[Orleans.Alias(00BCE16F)]
public virtual Task<MembershipTableData> ReadAllAsync(CancellationToken cancellationToken = default(CancellationToken))
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.

Parameters

cancellationTokenCancellationToken
A token which cancels the operation.

Returns

The membership information for a given table: MembershipTableData consisting multiple MembershipEntry entries and TableVersion, all read atomically.

ReadRow(SiloAddress)

abstract
[System.Obsolete(Use ReadRowAsync instead.)]
public abstract Task<MembershipTableData> ReadRow(SiloAddress key)
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.

Parameters

keySiloAddress
The address of the silo whose membership information needs to be read.

Returns

The membership information for a given silo: MembershipTableData consisting one MembershipEntry entry and TableVersion, read atomically.

ReadRowAsync(SiloAddress, CancellationToken)

virtual
View source
[Orleans.Alias(D851FB33)]
public virtual Task<MembershipTableData> ReadRowAsync(SiloAddress key, CancellationToken cancellationToken = default(CancellationToken))
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.

Parameters

keySiloAddress
The address of the silo to read.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

The membership information for a given silo: MembershipTableData consisting one MembershipEntry entry and TableVersion, read atomically.

UpdateIAmAlive(MembershipEntry)

abstract
[System.Obsolete(Use UpdateIAmAliveAsync instead.)]
public abstract Task UpdateIAmAlive(MembershipEntry entry)
Updates the IAmAliveTime column of the MembershipEntry for this silo.

Parameters

entryMembershipEntry
The membership entry containing the updated MembershipEntry value.

Returns

A task representing the update operation.

UpdateIAmAliveAsync(MembershipEntry, CancellationToken)

virtual
View source
[Orleans.Alias(B1A52D2B)]
public virtual Task UpdateIAmAliveAsync(MembershipEntry entry, CancellationToken cancellationToken = default(CancellationToken))
Updates the IAmAliveTime column of the MembershipEntry for this silo.

Parameters

entryMembershipEntry
The membership entry containing the updated liveness timestamp.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

A task representing the update operation.

UpdateRow(MembershipEntry, string, TableVersion)

abstract
[System.Obsolete(Use UpdateRowAsync instead.)]
public abstract Task<bool> UpdateRow(MembershipEntry entry, string etag, TableVersion 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 using the supplied entry. 2) The row eTag for the updated MembershipEntry will reflect the provider's metadata or concurrency-token policy. 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: 1) A MembershipEntry for a given silo does not exist in the table 2) 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. 3) The provider validates a separate canonical row concurrency token and the supplied etag does not match it.

Parameters

entryMembershipEntry
MembershipEntry to be updated.
etagstring
The provider-defined row entity tag obtained from a membership read.
tableVersionTableVersion
The new TableVersion for this table, along with its etag.

Returns

True if the update operation succeeded and false otherwise.

UpdateRowAsync(MembershipEntry, string, TableVersion, CancellationToken)

virtual
View source
[Orleans.Alias(E06D3DBC)]
public virtual Task<bool> UpdateRowAsync(MembershipEntry entry, string etag, TableVersion tableVersion, CancellationToken cancellationToken = default(CancellationToken))
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 using the supplied entry. 2) The row eTag for the updated MembershipEntry will reflect the provider's metadata or concurrency-token policy. 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: 1) A MembershipEntry for a given silo does not exist in the table 2) 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. 3) The provider validates a separate canonical row concurrency token and the supplied etag does not match it.

Parameters

entryMembershipEntry
The membership entry to update.
etagstring
The provider-defined row entity tag obtained from a membership read.
tableVersionTableVersion
The new table version and its expected etag.
cancellationTokenCancellationToken
A token which cancels the operation.

Returns

True if the update operation succeeded and false otherwise.