RegisterValue() public method

public RegisterValue ( TransactionalValue value ) : void
value TransactionalValue
return void
Example #1
0
        public void SetValue(Transaction transaction, object value)
        {
            if (this.transaction != null && this.transaction != transaction)
                throw new InvalidOperationException("Another transaction modified this value");

            foreach (long time in this.committedValues.Keys)
                if (time > transaction.Start)
                    throw new InvalidOperationException("Another transaction modified this value");

            if (this.transaction == null)
                transaction.RegisterValue(this);

            this.transaction = transaction;
            this.value = value;
        }