コード例 #1
0
        // Token: 0x060000AB RID: 171 RVA: 0x00004F20 File Offset: 0x00003120
        protected override void RunInternal()
        {
            IADToplogyConfigurationSession iadtoplogyConfigurationSession = ADSessionFactory.CreateIgnoreInvalidRootOrgSession(true);
            IADServer iadserver = iadtoplogyConfigurationSession.FindServerByName(this.m_nodeName.NetbiosName);

            if (iadserver == null)
            {
                throw new ServerNotFoundException(this.m_nodeName.NetbiosName);
            }
            IADDatabase[] array = iadtoplogyConfigurationSession.GetAllDatabases(iadserver).ToArray <IADDatabase>();
            if (array.Length <= 0)
            {
                AmTrace.Info("Server '{0}' does not have any databases that needs to be marked as dismounted", new object[]
                {
                    this.m_nodeName
                });
                return;
            }
            AmDbActionCode actionCode = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.SyncState);

            foreach (IADDatabase db in array)
            {
                AmDbClusterDatabaseSyncOperation operation = new AmDbClusterDatabaseSyncOperation(db, actionCode);
                this.m_clusDbSyncRequests++;
                base.EnqueueDatabaseOperation(operation);
            }
            base.StartDatabaseOperations();
        }
コード例 #2
0
 // Token: 0x0600007B RID: 123 RVA: 0x00004124 File Offset: 0x00002324
 protected void DetermineDatabaseOperations(Dictionary <Guid, DatabaseInfo> dbMap)
 {
     foreach (DatabaseInfo databaseInfo in dbMap.Values)
     {
         databaseInfo.Analyze();
         if (this.IsActionsMatchWithPreviousPhase(databaseInfo))
         {
             List <AmDbOperation> list     = new List <AmDbOperation>();
             IADDatabase          database = databaseInfo.Database;
             if (databaseInfo.IsMountedButAdminRequestedDismount)
             {
                 AmDbActionCode actionCode = new AmDbActionCode(AmDbActionInitiator.Admin, this.m_reasonCode, AmDbActionCategory.Dismount);
                 AmDbDismountAdminDismountedOperation item = new AmDbDismountAdminDismountedOperation(database, actionCode);
                 list.Add(item);
                 this.m_dismountRequests++;
             }
             else
             {
                 if (databaseInfo.IsMismounted)
                 {
                     AmDbActionCode actionCode2            = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.ForceDismount);
                     AmDbDismountMismountedOperation item2 = new AmDbDismountMismountedOperation(database, actionCode2, databaseInfo.MisMountedServerList);
                     list.Add(item2);
                     this.m_dismountRequests++;
                 }
                 if (databaseInfo.IsActiveOnDisabledServer && !base.AllCopiesAreDisfavored(database))
                 {
                     list.Add(base.BuildMoveForActivationDisabled(database));
                     this.m_moveRequests++;
                 }
                 if (databaseInfo.IsPeriodicMountRequired)
                 {
                     AmDbActionCode     actionCode3 = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.Mount);
                     AmDbMountOperation item3       = new AmDbMountOperation(database, actionCode3);
                     list.Add(item3);
                     this.m_mountRequests++;
                 }
                 if (databaseInfo.IsClusterDatabaseOutOfSync)
                 {
                     AmDbActionCode actionCode4             = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.SyncState);
                     AmDbClusterDatabaseSyncOperation item4 = new AmDbClusterDatabaseSyncOperation(database, actionCode4);
                     list.Add(item4);
                     this.m_clusDbSyncRequests++;
                 }
                 if (databaseInfo.IsAdPropertiesOutOfSync)
                 {
                     AmDbActionCode actionCode5        = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.SyncAd);
                     AmDbAdPropertySyncOperation item5 = new AmDbAdPropertySyncOperation(database, actionCode5);
                     list.Add(item5);
                     this.m_adSyncRequests++;
                 }
             }
             databaseInfo.OperationsQueued = list;
         }
     }
 }
コード例 #3
0
 // Token: 0x06000062 RID: 98 RVA: 0x000034CC File Offset: 0x000016CC
 protected virtual void PopulateWithDatabaseOperations(Dictionary <Guid, DatabaseInfo> dbMap)
 {
     foreach (DatabaseInfo databaseInfo in dbMap.Values)
     {
         databaseInfo.Analyze();
         if (this.m_isDebugOptionEnabled && this.m_amConfig.IsIgnoreServerDebugOptionEnabled(databaseInfo.ActiveServer))
         {
             AmTrace.Warning("Batchmounter operation for database {0} is not performed since debug option {1} is set for server {2} which is the current active for the database", new object[]
             {
                 databaseInfo.Database.Name,
                 databaseInfo.ActiveServer.NetbiosName,
                 AmDebugOptions.IgnoreServerFromAutomaticActions.ToString()
             });
         }
         else
         {
             List <AmDbOperation> list     = new List <AmDbOperation>();
             IADDatabase          database = databaseInfo.Database;
             if (databaseInfo.IsMountedButAdminRequestedDismount)
             {
                 AmDbActionCode actionCode = new AmDbActionCode(AmDbActionInitiator.Admin, this.m_reasonCode, AmDbActionCategory.Dismount);
                 AmDbDismountAdminDismountedOperation item = new AmDbDismountAdminDismountedOperation(database, actionCode);
                 list.Add(item);
                 this.m_dismountRequests++;
             }
             else
             {
                 if (databaseInfo.IsMismounted)
                 {
                     AmDbActionCode actionCode2            = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.ForceDismount);
                     AmDbDismountMismountedOperation item2 = new AmDbDismountMismountedOperation(database, actionCode2, databaseInfo.MisMountedServerList);
                     list.Add(item2);
                     this.m_dismountRequests++;
                 }
                 if (databaseInfo.IsActiveOnDisabledServer && !this.AllCopiesAreDisfavored(database))
                 {
                     list.Add(this.BuildMoveForActivationDisabled(database));
                     this.m_moveRequests++;
                 }
                 if (!databaseInfo.IsMountedOnActive)
                 {
                     AmDbActionCode     actionCode3 = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.Mount);
                     AmDbMountOperation item3       = new AmDbMountOperation(database, actionCode3);
                     list.Add(item3);
                     this.m_mountRequests++;
                 }
                 if (databaseInfo.IsClusterDatabaseOutOfSync)
                 {
                     AmDbActionCode actionCode4             = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.SyncState);
                     AmDbClusterDatabaseSyncOperation item4 = new AmDbClusterDatabaseSyncOperation(database, actionCode4);
                     list.Add(item4);
                     this.m_clusDbSyncRequests++;
                 }
                 if (databaseInfo.IsAdPropertiesOutOfSync)
                 {
                     AmDbActionCode actionCode5        = new AmDbActionCode(AmDbActionInitiator.Automatic, this.m_reasonCode, AmDbActionCategory.SyncAd);
                     AmDbAdPropertySyncOperation item5 = new AmDbAdPropertySyncOperation(database, actionCode5);
                     list.Add(item5);
                     this.m_adSyncRequests++;
                 }
             }
             databaseInfo.OperationsQueued = list;
         }
     }
 }