Esempio n. 1
0
        public Guid ProcessTransaction(ClusterUpdateTransaction txn)
        {
            if (_state != CoreState.RunningMaster)
            {
                throw new NotMasterException();
            }

            // Do some validation
            // Check store exists
            txn.JobId     = Guid.NewGuid();
            txn.PrevTxnId = _storeInfo[txn.StoreId].Queue(txn.JobId);
            _serverCore.QueueTransaction(txn.JobId, txn.StoreId, txn.Preconditions, txn.Deletes, txn.Inserts);
            _nodeComms.SendTransactionToSlaves(txn);
            return(txn.JobId);
        }