Ejemplo n.º 1
0
        internal void GetHtmlStatus(StringBuilder statusBuilder, TypeSettingCollection typeSettingCollection)
        {
            statusBuilder.Append("<table class=\"nodeGroupBox\">" + Environment.NewLine);
            AddHeaderLine(statusBuilder, "Group " + GroupName, 1);

            // display the the type setting information of the group
            if (typeSettingCollection != null)
            {
                statusBuilder.Append(@"<tr><td>" + Environment.NewLine);
                statusBuilder.Append("<table class=\"nodeGroupTypeIDBox\">" + Environment.NewLine);
                statusBuilder.Append("<tr><th align=\"left\">Type Infomation</th></tr>");

                foreach (TypeSetting ts in typeSettingCollection)
                {
                    if (ts.GroupName != null && ts.GroupName.ToUpperInvariant() == GroupName.ToUpperInvariant())
                    {
                        statusBuilder.Append(@"<tr>");
                        statusBuilder.Append(string.Format("<td align=\"left\"> {0} </td>", ts));
                        statusBuilder.Append(@"</tr>");
                    }
                }

                statusBuilder.Append(@"</table>" + Environment.NewLine);
                statusBuilder.Append(@"</td></tr>" + Environment.NewLine);
            }

            foreach (NodeCluster cluster in Clusters)
            {
                statusBuilder.Append(@"<tr><td>" + Environment.NewLine);
                cluster.GetHtmlStatus(statusBuilder);
                statusBuilder.Append(@"</td></tr>" + Environment.NewLine);
            }
            statusBuilder.Append(@"</table>" + Environment.NewLine);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }