コード例 #1
0
 private void writeCachedDirty() {
   Iterator4 i = _dirtyClassMetadata.iterator();
   while (i.moveNext()) {
     PersistentBase dirty = (PersistentBase) i.current();
     dirty.write(systemTransaction());
     dirty.notCachedDirty();
   }
   _dirtyClassMetadata.clear();
 }
コード例 #2
0
ファイル: DatabaseIdMapping.java プロジェクト: Galigator/db4o
 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;
 }
コード例 #3
0
ファイル: DatabaseIdMapping.java プロジェクト: Galigator/db4o
 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;
 }