Class ClusterService
- Namespace
- Dynamicweb.LoadBalancing.Data
- Assembly
- Dynamicweb.Core.dll
Service for working with the cluster / network load balancing nodes.
public class ClusterService
- Inheritance
-
ClusterService
- Inherited Members
Properties
CurrentNode
public static ClusterNode? CurrentNode { get; }
Property Value
Methods
ClearCache()
public void ClearCache()
Create(string, string)
Creates a new node in the Network Load Balancing setup.
public ClusterNode? Create(string hostName, string ipAddress)
Parameters
Returns
- ClusterNode
hasPersistedNewNode
Delete(int)
Removes a node from the Network Load Balancing setup.
public bool Delete(int id)
Parameters
id
intId of node
Returns
- bool
hasRemovedNodeFromCluster
GetAll()
Yields all nodes in the Network Load Balancing setup.
public IEnumerable<ClusterNode> GetAll()
Returns
- IEnumerable<ClusterNode>
nodes
GetByHostname(string)
public ClusterNode? GetByHostname(string hostName)
Parameters
hostName
string
Returns
GetByIP(string)
public ClusterNode? GetByIP(string ip)
Parameters
ip
string
Returns
GetNode(int)
Yields a node specified by host name.
public ClusterNode? GetNode(int id)
Parameters
id
int
Returns
- ClusterNode
node
Read(int)
Yields a node specified by id.
public ClusterNode? Read(int id)
Parameters
id
intId of node
Returns
- ClusterNode
node
Update(ClusterNode)
Updates the specified node, by persisting it.
public bool Update(ClusterNode node)
Parameters
node
ClusterNodeNode to be saved
Returns
- bool
hasBeenUpdated
UpdateTimestamp(ClusterNode)
Updates the specified node, by persisting it.
public bool UpdateTimestamp(ClusterNode node)
Parameters
node
ClusterNodeNode to be saved
Returns
- bool
hasBeenUpdated