Ejemplo n.º 1
0
 private void writeCachedDirty() {
   Iterator4 i = _dirtyClassMetadata.iterator();
   while (i.moveNext()) {
     PersistentBase dirty = (PersistentBase) i.current();
     dirty.write(systemTransaction());
     dirty.notCachedDirty();
   }
   _dirtyClassMetadata.clear();
 }
Ejemplo n.º 2
0
 public int addressForId(int id) {
   BTreeRange range = _slotTree.searchRange(trans(), new IdSlotMapping(id, 0, 0));
   Iterator4 pointers = range.pointers();
   if (pointers.moveNext()) {
     BTreePointer pointer = (BTreePointer) pointers.current();
     return ((IdSlotMapping) pointer.key())._address;
   }
   return 0;
 }
Ejemplo n.º 3
0
 public int mappedId(int oldID) {
   if (_cache.orig() == oldID) {
     return _cache.mapped();
   }
   int classID = mappedClassID(oldID);
   if (classID != 0) {
     return classID;
   }
   BTreeRange range = _idTree.searchRange(trans(), new MappedIDPair(oldID, 0));
   Iterator4 pointers = range.pointers();
   if (pointers.moveNext()) {
     BTreePointer pointer = (BTreePointer) pointers.current();
     _cache = (MappedIDPair) pointer.key();
     return _cache.mapped();
   }
   return 0;
 }