Class ClusterConfiguration
Data object holding Silo configuration parameters.
Inheritance
Namespace: Orleans.Runtime.Configuration
Assembly: Orleans.Core.Legacy.dll
Syntax
public class ClusterConfiguration : object
Constructors
| Improve this Doc View SourceClusterConfiguration()
ClusterConfiguration constructor.
Declaration
public ClusterConfiguration()
ClusterConfiguration(TextReader)
ClusterConfiguration constructor.
Declaration
public ClusterConfiguration(TextReader input)
Parameters
| Type | Name | Description |
|---|---|---|
| TextReader | input |
Properties
| Improve this Doc View SourceDefaults
The default configuration parameters that apply to each and every silo. These can be over-written on a per silo basis.
Declaration
public NodeConfiguration Defaults { get; }
Property Value
| Type | Description |
|---|---|
| NodeConfiguration |
Globals
The global configuration parameters that apply uniformly to all silos.
Declaration
public GlobalConfiguration Globals { get; }
Property Value
| Type | Description |
|---|---|
| GlobalConfiguration |
Overrides
Per silo configuration parameters overrides.
Declaration
public IDictionary<string, NodeConfiguration> Overrides { get; }
Property Value
| Type | Description |
|---|---|
| IDictionary<System.String, NodeConfiguration> |
PrimaryNode
The Primary Node IP and port (in dev setting).
Declaration
public IPEndPoint PrimaryNode { get; set; }
Property Value
| Type | Description |
|---|---|
| IPEndPoint |
SourceFile
The configuration file.
Declaration
public string SourceFile { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceCreateNodeConfigurationForSilo(String)
Creates a configuration node for a given silo.
Declaration
public NodeConfiguration CreateNodeConfigurationForSilo(string siloName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | siloName | Silo name. |
Returns
| Type | Description |
|---|---|
| NodeConfiguration | NodeConfiguration associated with the specified silo. |
GetOrCreateNodeConfigurationForSilo(String)
Creates a node config for the specified silo if one does not exist. Returns existing node if one already exists
Declaration
public NodeConfiguration GetOrCreateNodeConfigurationForSilo(string siloName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | siloName | Silo name. |
Returns
| Type | Description |
|---|---|
| NodeConfiguration | NodeConfiguration associated with the specified silo. |
Load(TextReader)
Loads configuration from a given input text reader.
Declaration
public void Load(TextReader input)
Parameters
| Type | Name | Description |
|---|---|---|
| TextReader | input | The TextReader to use. |
LoadFromFile(String)
Loads the configuration from a file
Declaration
public void LoadFromFile(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | The file path. |
LocalhostPrimarySilo(Int32, Int32)
Returns a prepopulated ClusterConfiguration object for a primary local silo (for testing)
Declaration
public static ClusterConfiguration LocalhostPrimarySilo(int siloPort = 22222, int gatewayPort = 40000)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | siloPort | TCP port for silo to silo communication |
| System.Int32 | gatewayPort | Client gateway TCP port |
Returns
| Type | Description |
|---|---|
| ClusterConfiguration | ClusterConfiguration object that can be passed to Silo or SiloHost classes for initialization |
StandardLoad()
Loads the configuration from the standard paths
Declaration
public void StandardLoad()
ToString(String)
Prints the current config for a given silo.
Declaration
public string ToString(string siloName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | siloName | The name of the silo to print its configuration. |
Returns
| Type | Description |
|---|---|
| System.String |
TryGetNodeConfigurationForSilo(String, out NodeConfiguration)
Obtains the configuration for a given silo.
Declaration
public bool TryGetNodeConfigurationForSilo(string siloName, out NodeConfiguration siloNode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | siloName | Silo name. |
| NodeConfiguration | siloNode | NodeConfiguration associated with the specified silo. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if node was found |
Update(String)
Updates existing configuration.
Declaration
public void Update(string input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | input | The input string in XML format to use to update the existing configuration. |