コード例 #1
0
 public virtual void Put(Transaction trans, int objectId, long version)
 {
     CommitTimestampSupport.TimestampEntry te = new CommitTimestampSupport.TimestampEntry
                                                    (objectId, version);
     IdToTimestamp().Add(trans, te);
     TimestampToId().Add(trans, te);
 }
コード例 #2
0
 public virtual long VersionForId(int id)
 {
     if (IdToTimestamp() == null || id == 0)
     {
         return(0);
     }
     CommitTimestampSupport.TimestampEntry te = (CommitTimestampSupport.TimestampEntry
                                                 )IdToTimestamp().Search(_container.SystemTransaction(), new CommitTimestampSupport.TimestampEntry
                                                                             (id, 0));
     if (te == null)
     {
         return(0);
     }
     return(te.GetCommitTimestamp());
 }
コード例 #3
0
 private void AddTimestamp(Transaction trans, IEnumerator it, long commitTimestamp
                           )
 {
     while (it.MoveNext())
     {
         IObjectInfo objInfo = (IObjectInfo)it.Current;
         CommitTimestampSupport.TimestampEntry te = new CommitTimestampSupport.TimestampEntry
                                                        ((int)objInfo.GetInternalID(), commitTimestamp);
         CommitTimestampSupport.TimestampEntry oldEntry = (CommitTimestampSupport.TimestampEntry
                                                           ) this._enclosing._idToTimestamp.Remove(trans, te);
         if (oldEntry != null)
         {
             this._enclosing._timestampToId.Remove(trans, oldEntry);
         }
         if (commitTimestamp != 0)
         {
             this._enclosing._idToTimestamp.Add(trans, te);
             this._enclosing._timestampToId.Add(trans, te);
         }
     }
 }
コード例 #4
0
		public virtual void Put(Transaction trans, int objectId, long version)
		{
			CommitTimestampSupport.TimestampEntry te = new CommitTimestampSupport.TimestampEntry
				(objectId, version);
			IdToTimestamp().Add(trans, te);
			TimestampToId().Add(trans, te);
		}
コード例 #5
0
			private void AddTimestamp(Transaction trans, IEnumerator it, long commitTimestamp
				)
			{
				while (it.MoveNext())
				{
					IObjectInfo objInfo = (IObjectInfo)it.Current;
					CommitTimestampSupport.TimestampEntry te = new CommitTimestampSupport.TimestampEntry
						((int)objInfo.GetInternalID(), commitTimestamp);
					CommitTimestampSupport.TimestampEntry oldEntry = (CommitTimestampSupport.TimestampEntry
						)this._enclosing._idToTimestamp.Remove(trans, te);
					if (oldEntry != null)
					{
						this._enclosing._timestampToId.Remove(trans, oldEntry);
					}
					if (commitTimestamp != 0)
					{
						this._enclosing._idToTimestamp.Add(trans, te);
						this._enclosing._timestampToId.Add(trans, te);
					}
				}
			}