Class Metabank.SectionZone
Represents metadata for Zone
Inheritance
System.Object
Metabank.SectionZone
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.Sky.dll
public sealed class SectionZone : Metabank.SectionRegionBase, INamed
Properties
Declaration
public IEnumerable<string> HostNames { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Navigates to a named child zone or host. The search is done using case-insensitive comparison, however
the underlying file system may be case-sensitive and must be supplied the exact name
Declaration
public override Metabank.SectionRegionBase this[string name] { get; }
Parameters
Type |
Name |
Description |
System.String |
name |
|
Property Value
Overrides
Returns the NOC that this zone is under
Declaration
public Metabank.SectionNOC NOC { get; }
Property Value
Returns parent zone for this zone or null if this zone is top-level under NOC
Declaration
public Metabank.SectionZone ParentZone { get; }
Property Value
Returns a mapping of ProcessorID to process controller host pair {Primary, Secondary}
Declaration
public IDictionary<int, IEnumerable<Metabank.SectionHost>> ProcessorMap { get; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.Int32, System.Collections.Generic.IEnumerable<Metabank.SectionHost>> |
|
Returns region path to this zone
Declaration
public override string RegionPath { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Declaration
public override string RootNodeName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Returns names of child zones
Declaration
public IEnumerable<string> SubZoneNames { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Returns zone governor host/s in order of their names, primary host returned first.
Returns empty enumeration if there are no zgov hosts
Declaration
public IEnumerable<Metabank.SectionHost> ZoneGovernorHosts { get; }
Property Value
Returns the first host that has Zone governor in its role, or null if there are no governors in the zone
Declaration
public Metabank.SectionHost ZoneGovernorPrimaryHost { get; }
Property Value
Methods
Tries to find hosts that run zone governors in this zone or parent zone chain, optionally looking in the higher-level NOCs.
If iAmZoneGovernor is true then this zone is skipped as the zone gov of this zone gov is not itself.
Pass filter lambda to filter-out-unneeded hosts in the chain. Returns empty enumeration for no matches
Declaration
public IEnumerable<Metabank.SectionHost> FindNearestParentZoneGovernors(bool? iAmZoneGovernor = default(bool? ), Func<Metabank.SectionHost, bool> filter = null, bool transcendNOC = false)
Parameters
Type |
Name |
Description |
System.Nullable<System.Boolean> |
iAmZoneGovernor |
|
System.Func<Metabank.SectionHost, System.Boolean> |
filter |
|
System.Boolean |
transcendNOC |
|
Returns
Declaration
public Metabank.SectionHost GetHost(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Maps map processor id to {Primary, Secondary} host pair or throws
Declaration
public IEnumerable<Metabank.SectionHost> GetProcessorHostsByID(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Declaration
public Metabank.SectionZone GetSubZone(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Returns true if this zone has direct or indirect parent zone governor above it, optionally examining higher-level NOCs.
If iAmZoneGovernor is true then this zone is skipped as the zone gov of this zone gov is not itself.
Declaration
public bool HasDirectOrIndirectParentZoneGovernor(Metabank.SectionHost zgovHost, bool? iAmZoneGovernor = default(bool? ), bool transcendNOC = false)
Parameters
Type |
Name |
Description |
Metabank.SectionHost |
zgovHost |
|
System.Nullable<System.Boolean> |
iAmZoneGovernor |
|
System.Boolean |
transcendNOC |
|
Returns
Type |
Description |
System.Boolean |
|
Returns true if this zone has direct or indirect parent zone governor above it, optionally examining higher-level NOCs.
If iAmZoneGovernor is true then this zone is skipped as the zone gov of this zone gov is not itself.
Declaration
public bool HasDirectOrIndirectParentZoneGovernor(string zgovHost, bool? iAmZoneGovernor = default(bool? ), bool transcendNOC = false)
Parameters
Type |
Name |
Description |
System.String |
zgovHost |
|
System.Nullable<System.Boolean> |
iAmZoneGovernor |
|
System.Boolean |
transcendNOC |
|
Returns
Type |
Description |
System.Boolean |
|
Maps sharding ID to processor ID. This method is used to map process unqiue mutex id, or GDID to processor ID - which denotes a
set of actual executor hosts
Declaration
public int MapShardingKeyToProcessorID(string shardingKey)
Parameters
Type |
Name |
Description |
System.String |
shardingKey |
|
Returns
Type |
Description |
System.Int32 |
|
Tries to map processor id to {Primary, Secondary} host pair or null if there is no mapping
Declaration
public IEnumerable<Metabank.SectionHost> TryGetProcessorHostsByID(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Validate(Metabank.ValidationContext)
Declaration
public override void Validate(Metabank.ValidationContext ctx)
Parameters
Overrides
Implements
Extension Methods