Edit

Share via


PeerResolver.Unregister(Object, TimeSpan) Method

Definition

Removes the registration entry for a node from a peer mesh.

public:
 abstract void Unregister(System::Object ^ registrationId, TimeSpan timeout);
public abstract void Unregister (object registrationId, TimeSpan timeout);
abstract member Unregister : obj * TimeSpan -> unit
Public MustOverride Sub Unregister (registrationId As Object, timeout As TimeSpan)

Parameters

registrationId
Object

A registration ID for the node obtained by a previous call to Register(String, PeerNodeAddress, TimeSpan).

timeout
TimeSpan

The length of time to wait for a successful removal of the registration from the peer mesh. If the attempt fails, TimeoutException is raised on the peer.

Remarks

A registration ID is a peer resolver token, that, at the very minimum, represents the tuple of a peer node ID and the mesh ID. This ID value must have been obtained in a previous call to Register.

Unregister is called in two specific cases:

  • When the PeerNode is leaving the peer mesh (usually as the result of closing the last peer channel or service host that is associated with it).

  • When the PeerNode can find no available endpoint addresses of other nodes participating in the peer mesh. As a result, the PeerNode is no longer reachable, and it will attempt to call Unregister to unregister itself from the PeerResolver. If other peer nodes within the mesh become available subsequent to unregistration, the node can re-register itself by calling Register and obtaining a new registration ID.

Applies to