TransferAuthorityAsync
method in Coherence.Toolkit.ICoherenceSync
Methods
Task<RequestAuthorityResult> TransferAuthorityAsync(ClientID clientID, AuthorityType authorityTransferred = AuthorityType.Full, CancellationToken cancellationToken = default)
Transfers authority over this entity to another client.
Parameters
| Type | Name | Description |
|---|---|---|
| ClientID | clientID | Identifier of the client that should get authority over this entity. |
| AuthorityType | authorityTransferred | Type of authority transfer to transfer to the client. |
| CancellationToken | cancellationToken | Token that can be used to cancel the transfer request. |
Returns
| Type | Description |
|---|---|
| Task<RequestAuthorityResult> | Task representing the asynchronous transfer operation. |
Remarks
Cancelling cancellationToken (or destroying the entity) completes the returned
task with Canceled. This only stops awaiting the result; it
does not recall a transfer request that has already been sent, so the transfer may still take effect.
The request is only prevented from being sent if the token is already cancelled when this method is called.