Beispiel #1
0
 /// <summary>
 /// Set the value.
 /// </summary>
 /// <param name="val">The new value.</param>
 /// <param name="commitPoint">The transaction's commit point.</param>
 /// <param name="msecs">The clock time.</param>
 internal void SetValue(object val, long commitPoint, int msecs)
 {
     if (_tvals == null)
     {
         _tvals = new TVal(val, commitPoint, msecs);
     }
     else if (_faults.get() > 0)
     {
         _tvals = new TVal(val, commitPoint, msecs, _tvals);
         _faults.set(0);
     }
     else
     {
         _tvals = _tvals.Next;
         _tvals.SetValue(val, commitPoint, msecs);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Set the value.
        /// </summary>
        /// <param name="val">The new value.</param>
        /// <param name="commitPoint">The transaction's commit point.</param>
        internal void SetValue(object val, long commitPoint)
        {
            int hcount = HistCount();

            if (_tvals == null)
            {
                _tvals = new TVal(val, commitPoint);
            }
            else if ((_faults.get() > 0 && hcount < _maxHistory) || hcount < _minHistory)
            {
                _tvals = new TVal(val, commitPoint, _tvals);
                _faults.set(0);
            }
            else
            {
                _tvals = _tvals.Next;
                _tvals.SetValue(val, commitPoint);
            }
        }