// Token: 0x06000755 RID: 1877 RVA: 0x00023DE4 File Offset: 0x00021FE4
        public void DeleteTimeStamps()
        {
            if (this.m_databases == null || this.m_databases.Count == 0)
            {
                ClusterBatchLastLogGenDeleter.Tracer.TraceDebug((long)this.GetHashCode(), "No databases specified, so skipping cluster batch timestamp deletion.");
                return;
            }
            AmClusterHandle amClusterHandle;

            if (this.m_cluster == null)
            {
                amClusterHandle = ClusapiMethods.OpenCluster(null);
            }
            else
            {
                amClusterHandle = this.m_cluster.Handle;
            }
            if (amClusterHandle.IsInvalid)
            {
                Exception ex = new ClusterApiException("OpenCluster", new Win32Exception());
                ClusterBatchLastLogGenDeleter.Tracer.TraceError <Exception>((long)this.GetHashCode(), "The cluster handle is invalid! Exception: {0}", ex);
                throw ex;
            }
            try
            {
                this.DeleteTimeStampsInternal(amClusterHandle);
            }
            finally
            {
                if (this.m_cluster == null)
                {
                    amClusterHandle.Close();
                }
            }
        }
Ejemplo n.º 2
0
        // Token: 0x060001BE RID: 446 RVA: 0x00008438 File Offset: 0x00006638
        private void SetNetworkControlData(AmClusterNetworkControlCode code, IntPtr buffer, uint bufferSize)
        {
            uint num  = 0U;
            int  num2 = ClusapiMethods.ClusterNetworkControl(this.Handle, IntPtr.Zero, code, buffer, bufferSize, IntPtr.Zero, 0U, out num);

            if (num2 != 0)
            {
                ClusterApiException ex = AmExceptionHelper.ConstructClusterApiException(num2, "ClusterNetworkControl(controlcode={0})", new object[]
                {
                    code
                });
                AmClusterNetwork.Tracer.TraceDebug((long)this.GetHashCode(), ex.Message);
                throw ex;
            }
        }
Ejemplo n.º 3
0
        // Token: 0x06000241 RID: 577 RVA: 0x0000A6B4 File Offset: 0x000088B4
        public void SetAllPossibleOwnerNodes()
        {
            IEnumerable <IAmClusterNode> enumerable = null;
            ClusterApiException          ex         = null;

            try
            {
                enumerable = this.OwningCluster.EnumerateNodes();
                foreach (IAmClusterNode amClusterNode in enumerable)
                {
                    uint num = ClusapiMethods.AddClusterResourceNode(this.Handle, amClusterNode.Handle);
                    if (num != 0U && num != 5010U)
                    {
                        ex = AmExceptionHelper.ConstructClusterApiException((int)num, "AddClusterResourceNode( resource={0}, node={1} )", new object[]
                        {
                            this.Name,
                            amClusterNode.Name
                        });
                    }
                }
            }
            finally
            {
                if (enumerable != null)
                {
                    foreach (IAmClusterNode amClusterNode2 in enumerable)
                    {
                        amClusterNode2.Dispose();
                    }
                }
                if (ex != null)
                {
                    throw ex;
                }
            }
        }