Exemple #1
0
 public _IVisitor4_336(DefragmentServicesImpl _enclosing, CommitTimestampSupport target
                       , LocalTransaction targetTransaction)
 {
     this._enclosing        = _enclosing;
     this.target            = target;
     this.targetTransaction = targetTransaction;
 }
Exemple #2
0
        private long CommitTimestampUsage()
        {
            LocalTransaction       st = (LocalTransaction)_db.SystemTransaction();
            CommitTimestampSupport commitTimestampSupport = st.CommitTimestampSupport();

            if (commitTimestampSupport == null)
            {
                return(0);
            }
            BTree idToTimestampBtree     = commitTimestampSupport.IdToTimestamp();
            long  idToTimestampBTreeSize = idToTimestampBtree == null ? 0 : BTreeUsage(idToTimestampBtree
                                                                                       );
            BTree timestampToIdBtree     = commitTimestampSupport.TimestampToId();
            long  timestampToIdBTreeSize = timestampToIdBtree == null ? 0 : BTreeUsage(timestampToIdBtree
                                                                                       );

            return(idToTimestampBTreeSize + timestampToIdBTreeSize);
        }
Exemple #3
0
        public virtual void DefragIdToTimestampBtree()
        {
            if (_sourceDb.SystemData().IdToTimestampIndexId() == 0)
            {
                return;
            }
            LocalTransaction targetTransaction = (LocalTransaction)_targetDb.SystemTransaction
                                                     ();
            LocalTransaction sourceTransaction = (LocalTransaction)_sourceDb.SystemTransaction
                                                     ();
            CommitTimestampSupport target = targetTransaction.CommitTimestampSupport();
            CommitTimestampSupport source = sourceTransaction.CommitTimestampSupport();

            if (source.IdToTimestamp() == null)
            {
                return;
            }
            source.IdToTimestamp().TraverseKeys(sourceTransaction, new _IVisitor4_336(this, target
                                                                                      , targetTransaction));
        }