Esempio n. 1
0
 public void ProcessCopy(DefragmentContextImpl context)
 {
     ClassMetadata.DefragObject(context);
     if (_enclosing._objectCommitFrequency > 0)
     {
         _enclosing._objectCount++;
         if (_enclosing._objectCount == _enclosing._objectCommitFrequency)
         {
             services.TargetCommit();
             services.Mapping().Commit();
             _enclosing._objectCount = 0;
         }
     }
 }
Esempio n. 2
0
 public virtual void Flush(DefragmentServicesImpl context)
 {
     if (_ids == null)
     {
         return;
     }
     IEnumerator idIter = new TreeKeyIterator(_ids);
     while (idIter.MoveNext())
     {
         var objectID = ((int) idIter.Current);
         var isClassID = false;
         if (objectID < 0)
         {
             objectID = -objectID;
             isClassID = true;
         }
         // seen object ids don't come by here anymore - any other candidates?
         context.MapIDs(objectID, context.TargetNewId(), isClassID);
     }
     context.Mapping().Commit();
     _ids = null;
 }
Esempio n. 3
0
        public virtual void Flush(DefragmentServicesImpl context)
        {
            if (_ids == null)
            {
                return;
            }
            IEnumerator idIter = new TreeKeyIterator(_ids);

            while (idIter.MoveNext())
            {
                int  objectID  = ((int)idIter.Current);
                bool isClassID = false;
                if (objectID < 0)
                {
                    objectID  = -objectID;
                    isClassID = true;
                }
                // seen object ids don't come by here anymore - any other candidates?
                context.MapIDs(objectID, context.TargetNewId(), isClassID);
            }
            context.Mapping().Commit();
            _ids = null;
        }