コード例 #1
0
 // Token: 0x060008BA RID: 2234 RVA: 0x00029FC4 File Offset: 0x000281C4
 private static bool EvictDagClusterNodeInternal(HaTaskStringBuilderOutputHelper output, AmServerName convictedNode, out string verboseLog)
 {
     ExTraceGlobals.ClusterTracer.TraceDebug <AmServerName>(0L, "Going to EvictClusterNode( {0} ) on this machine.", convictedNode);
     try
     {
         using (IAmCluster amCluster = ClusterFactory.Instance.Open())
         {
             amCluster.EvictNodeFromCluster(convictedNode);
         }
     }
     catch (ClusterException ex)
     {
         output.AppendLogMessage("EvictDagClusterNode got exception {0}", new object[]
         {
             ex
         });
         AmClusterException exception = DagHelper.TranslateClusterExceptionForClient(ex);
         DagHelper.ThrowDagTaskOperationWrapper(exception);
     }
     catch (LocalizedException ex2)
     {
         output.AppendLogMessage("EvictDagClusterNode got exception {0}", new object[]
         {
             ex2
         });
         DagHelper.ThrowDagTaskOperationWrapper(ex2);
     }
     finally
     {
         verboseLog = output.ToString();
     }
     return(true);
 }
コード例 #2
0
 // Token: 0x060008B8 RID: 2232 RVA: 0x00029E34 File Offset: 0x00028034
 private static void AddDagClusterNodeInternal(HaTaskStringBuilderOutputHelper output, AmServerName mailboxServerName, out string verboseLog)
 {
     try
     {
         Exception ex = null;
         output.AppendLogMessage("Opening a local AmCluster handle.", new object[0]);
         using (IAmCluster amCluster = ClusterFactory.Instance.Open())
         {
             output.WriteProgressSimple(ReplayStrings.DagTaskAddingServerToDag(mailboxServerName.NetbiosName, amCluster.Name));
             GCHandle value = GCHandle.Alloc(output);
             try
             {
                 output.LastException = null;
                 output.MaxPercentageDuringCallback = 0;
                 amCluster.AddNodeToCluster(mailboxServerName, output, GCHandle.ToIntPtr(value), out ex, true);
             }
             finally
             {
                 value.Free();
             }
         }
         if (output.LastException != null)
         {
             output.WriteErrorSimple(output.LastException);
         }
         if (ex != null)
         {
             output.WriteErrorSimple(ex);
         }
         output.WriteProgressSimple(ReplayStrings.DagTaskJoinedNodeToCluster(mailboxServerName.NetbiosName));
     }
     catch (LocalizedException exception)
     {
         DagHelper.ThrowDagTaskOperationWrapper(exception);
     }
     finally
     {
         verboseLog = output.ToString();
     }
 }