Defines a callback method for notifying applications when a node leaves the cluster.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)

Syntax

C#
public delegate void MemberLeftCallback(
	NodeInfo nodeInfo
)
Visual Basic
Public Delegate Sub MemberLeftCallback ( _
	nodeInfo As NodeInfo _
)
Visual C++
public delegate void MemberLeftCallback(
	NodeInfo^ nodeInfo
)

Parameters

nodeInfo
Type: Alachisoft.NCache.Web.Net..::..NodeInfo
The information of the member that has left the cluster. It describes the member in terms of the Ip Address and server port.

Remarks

This handler is invoked every time a node leaves the cluster.

Examples

The following example demonstrates how to use the MemberLeftCallback class to notifiy an application when a node leaves the cluster. You could include this code in a code declaration block in the Web Forms page, or in a page code-behind file.
CopyC#
public void OnMemberLeft(Alachisoft.NCache.Web.Net.NodeInfo nodeInfo)
{
    // ...
}

protected void Application_Start(object sender, EventArgs e)
{
    try
    {
        NCache.InitializeCache("myReplicatedCache");
        NCache.Cache.MemberLeft += new MemberLeftCallback(this.OnMemberLeft);
    }
    catch(Exception e)
    {
    }
}

See Also