public NodeGroupStatus GetNodeGroupStatus(TypeSettingCollection typeSettingCollection) { NodeGroupStatus nodeGroupStatus = new NodeGroupStatus(); nodeGroupStatus.GroupName = this.GroupName; if (typeSettingCollection != null) { foreach (TypeSetting ts in typeSettingCollection) { if (ts.GroupName != null && ts.GroupName.ToUpperInvariant() == GroupName.ToUpperInvariant()) { TypeSettingStatus tss = TypeSpecificStatisticsManager.Instance.GetStatus(ts.TypeId); if (tss == null) //should not be null { _log.WarnFormat("NodeGroup:GetNodeGroupStatus " + "TypeSettingStatus is null for typeId:{0}", ts.TypeId); tss = new TypeSettingStatus(); //add empty one to hold place and show error } nodeGroupStatus.TypeSettingStatuses.Add(tss); } } } foreach (NodeCluster cluster in Clusters) { nodeGroupStatus.NodeClusterStatuses.Add(cluster.GetNodeClusterStatus()); } return(nodeGroupStatus); }
public NodeGroupStatus GetNodeGroupStatus(TypeSettingCollection typeSettingCollection) { NodeGroupStatus nodeGroupStatus = new NodeGroupStatus(); nodeGroupStatus.GroupName = this.GroupName; if (typeSettingCollection != null) { foreach (TypeSetting ts in typeSettingCollection) { if (ts.GroupName.ToUpperInvariant() == GroupName.ToUpperInvariant()) { TypeSettingStatus typeSettingStatus = new TypeSettingStatus(); typeSettingStatus.TypeName = ts.TypeName; typeSettingStatus.GroupName = ts.GroupName; typeSettingStatus.TypeId = ts.TypeId; typeSettingStatus.Disabled = ts.Disabled; typeSettingStatus.Compress = ts.Compress; typeSettingStatus.CheckRaceCondition = ts.CheckRaceCondition; typeSettingStatus.TTLSetting = ts.TTLSetting; typeSettingStatus.RelatedIndexTypeId = ts.RelatedIndexTypeId; if (ts.HydrationPolicy != null) { typeSettingStatus.HydrationPolicyStatus = new HydrationPolicyStatus(); typeSettingStatus.HydrationPolicyStatus.KeyType = ts.HydrationPolicy.KeyType.ToString(); typeSettingStatus.HydrationPolicyStatus.HydrateMisses = (ts.HydrationPolicy.Options & RelayHydrationOptions.HydrateOnMiss) == RelayHydrationOptions.HydrateOnMiss; typeSettingStatus.HydrationPolicyStatus.HydrateBulkMisses = (ts.HydrationPolicy.Options & RelayHydrationOptions.HydrateOnBulkMiss) == RelayHydrationOptions.HydrateOnBulkMiss; } nodeGroupStatus.TypeSettingStatuses.Add(typeSettingStatus); } } } foreach (NodeCluster cluster in Clusters) { nodeGroupStatus.NodeClusterStatuses.Add(cluster.GetNodeClusterStatus()); } return(nodeGroupStatus); }
public NodeGroupStatus GetNodeGroupStatus(TypeSettingCollection typeSettingCollection) { NodeGroupStatus nodeGroupStatus = new NodeGroupStatus(); nodeGroupStatus.GroupName = this.GroupName; if (typeSettingCollection != null) { foreach (TypeSetting ts in typeSettingCollection) { if (ts.GroupName.ToUpperInvariant() == GroupName.ToUpperInvariant()) { TypeSettingStatus typeSettingStatus = new TypeSettingStatus(); typeSettingStatus.TypeName = ts.TypeName; typeSettingStatus.GroupName = ts.GroupName; typeSettingStatus.TypeId = ts.TypeId; typeSettingStatus.Disabled = ts.Disabled; typeSettingStatus.Compress = ts.Compress; typeSettingStatus.CheckRaceCondition = ts.CheckRaceCondition; typeSettingStatus.TTLSetting = ts.TTLSetting; typeSettingStatus.RelatedIndexTypeId = ts.RelatedIndexTypeId; if (ts.HydrationPolicy != null) { typeSettingStatus.HydrationPolicyStatus = new HydrationPolicyStatus(); typeSettingStatus.HydrationPolicyStatus.KeyType = ts.HydrationPolicy.KeyType.ToString(); typeSettingStatus.HydrationPolicyStatus.HydrateMisses = (ts.HydrationPolicy.Options & RelayHydrationOptions.HydrateOnMiss) == RelayHydrationOptions.HydrateOnMiss; typeSettingStatus.HydrationPolicyStatus.HydrateBulkMisses = (ts.HydrationPolicy.Options & RelayHydrationOptions.HydrateOnBulkMiss) == RelayHydrationOptions.HydrateOnBulkMiss; } nodeGroupStatus.TypeSettingStatuses.Add(typeSettingStatus); } } } foreach (NodeCluster cluster in Clusters) { nodeGroupStatus.NodeClusterStatuses.Add(cluster.GetNodeClusterStatus()); } return nodeGroupStatus; }