From: Wolfgang M. M. <wol...@us...> - 2004-05-03 12:58:20
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16328/src/org/exist/storage/cache Modified Files: LRDCache.java ClockCache.java GClockCache.java Log Message: org.exist.xmldb.LocalCollection should not hold a direct reference to the actual database collection object. Keeping the reference conflicts with the database internal collection caching. Index: GClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/GClockCache.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GClockCache.java 29 Mar 2004 14:15:12 -0000 1.9 --- GClockCache.java 3 May 2004 12:58:11 -0000 1.10 *************** *** 112,117 **** } ! protected void removeOne(Cacheable item) { ! Cacheable old; boolean removed = false; int bucket; --- 112,117 ---- } ! protected Cacheable removeOne(Cacheable item) { ! Cacheable old = null; boolean removed = false; int bucket; *************** *** 140,143 **** --- 140,144 ---- } } while (!removed); + return old; } Index: LRDCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/LRDCache.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LRDCache.java 13 Dec 2003 12:33:20 -0000 1.3 --- LRDCache.java 3 May 2004 12:58:11 -0000 1.4 *************** *** 90,94 **** * @see org.exist.storage.cache.LFUCache#removeOne(org.exist.storage.cache.Cacheable) */ ! protected void removeOne(Cacheable item) { Cacheable old; double rd = 0, minRd = -1; --- 90,94 ---- * @see org.exist.storage.cache.LFUCache#removeOne(org.exist.storage.cache.Cacheable) */ ! protected Cacheable removeOne(Cacheable item) { Cacheable old; double rd = 0, minRd = -1; *************** *** 117,120 **** --- 117,121 ---- items[bucket] = item; map.put(item.getKey(), item); + return old; } Index: ClockCache.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/cache/ClockCache.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ClockCache.java 29 Mar 2004 14:15:12 -0000 1.11 --- ClockCache.java 3 May 2004 12:58:11 -0000 1.12 *************** *** 137,141 **** for (int i = 0; i < count; i++) { if (items[i] != null && items[i].getKey() == key) { ! items[i] = null; return; } --- 137,141 ---- for (int i = 0; i < count; i++) { if (items[i] != null && items[i].getKey() == key) { ! System.arraycopy(items, i + 1, items, i, --count - i); return; } |