// Token: 0x06000049 RID: 73 RVA: 0x00002AB0 File Offset: 0x00000CB0
        protected void StartDatabaseOperationBatch(Guid dbGuid, List <AmDbOperation> operationList)
        {
            AmDatabaseQueueManager databaseQueueManager = AmSystemManager.Instance.DatabaseQueueManager;

            if (!databaseQueueManager.Enqueue(dbGuid, operationList, false))
            {
                foreach (AmDbOperation opr in operationList)
                {
                    this.DecrementCounters(opr);
                }
            }
        }
        // Token: 0x0600004B RID: 75 RVA: 0x00002B38 File Offset: 0x00000D38
        protected void StartDatabaseOperations()
        {
            AmDatabaseQueueManager databaseQueueManager = AmSystemManager.Instance.DatabaseQueueManager;

            foreach (AmDbOperation opr in this.m_opList)
            {
                if (!databaseQueueManager.Enqueue(opr))
                {
                    this.DecrementCounters(opr);
                }
            }
        }
Exemple #3
0
        // Token: 0x06000649 RID: 1609 RVA: 0x0001F238 File Offset: 0x0001D438
        internal void DispatchOperations()
        {
            bool flag = false;

            lock (this.locker)
            {
                if (this.Phase != BatchDatabaseOperation.BatchPhase.Initializing)
                {
                    throw new InvalidOperationException("Batch can only be dispatched once");
                }
                if (this.opList.Count == 0)
                {
                    this.Phase = BatchDatabaseOperation.BatchPhase.Complete;
                }
                else
                {
                    this.Phase           = BatchDatabaseOperation.BatchPhase.Dispatching;
                    this.completionEvent = new ManualOneShotEvent("BatchDatabaseOperation");
                    flag = true;
                }
            }
            if (flag)
            {
                AmDatabaseQueueManager databaseQueueManager = AmSystemManager.Instance.DatabaseQueueManager;
                foreach (AmDbOperation opr in this.opList)
                {
                    databaseQueueManager.Enqueue(opr);
                }
                lock (this.locker)
                {
                    if (this.Phase == BatchDatabaseOperation.BatchPhase.Dispatching)
                    {
                        this.Phase = BatchDatabaseOperation.BatchPhase.Running;
                    }
                }
            }
        }
        internal void Enqueue()
        {
            AmDatabaseQueueManager databaseQueueManager = AmSystemManager.Instance.DatabaseQueueManager;

            databaseQueueManager.Enqueue(this);
        }