Interface IClusterMemberLifetime
Provides additional control over IRaftCluster lifecycle.
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.AspNetCore.Cluster.dll
Syntax
public interface IClusterMemberLifetime
Methods
| Edit this page View SourceOnStart(IRaftCluster, IDictionary<string, string>)
Configures instance of IRaftCluster after its construction.
Declaration
void OnStart(IRaftCluster cluster, IDictionary<string, string> metadata)
Parameters
Type | Name | Description |
---|---|---|
IRaftCluster | cluster | The instance to be configured. |
IDictionary<string, string> | metadata | The metadata of the local cluster member to fill. |
Remarks
This method can be used to attach all necessary event handlers.
OnStop(IRaftCluster)
Configures instance of IRaftCluster before its destruction.
Declaration
void OnStop(IRaftCluster cluster)
Parameters
Type | Name | Description |
---|---|---|
IRaftCluster | cluster | The instance to be configured. |
Remarks
This method can be used to detach all event handlers attached in OnStart(IRaftCluster, IDictionary<string, string>) method.