Author: j16sdiz
Date: 2009-02-13 13:54:45 +0000 (Fri, 13 Feb 2009)
New Revision: 25606
Modified:
trunk/freenet/src/freenet/support/LRUQueue.java
Log:
remove LRUQueue(sizeLimit) code - it is broken and unused
Modified: trunk/freenet/src/freenet/support/LRUQueue.java
===================================================================
--- trunk/freenet/src/freenet/support/LRUQueue.java 2009-02-13 13:54:15 UTC
(rev 25605)
+++ trunk/freenet/src/freenet/support/LRUQueue.java 2009-02-13 13:54:45 UTC
(rev 25606)
@@ -19,16 +19,10 @@
*/
private final DoublyLinkedListImpl list = new DoublyLinkedListImpl();
private final Hashtable hash = new Hashtable();
- private final int sizeLimit;
public LRUQueue() {
- sizeLimit = -1;
}
- public LRUQueue(int mySizeLimit) {
- sizeLimit = mySizeLimit;
- }
-
/**
* push()ing an object that is already in
* the queue moves that object to the most
@@ -40,9 +34,6 @@
if (insert == null) {
insert = new QItem(obj);
hash.put(obj,insert);
-
- if(sizeLimit!=-1 && list.size() > sizeLimit)
- pop();
} else {
list.remove(insert);
}
@@ -58,9 +49,6 @@
if (insert == null) {
insert = new QItem(obj);
hash.put(obj,insert);
- if(sizeLimit!=-1 && list.size() > sizeLimit) {
- hash.remove(((QItem)list.shift()).obj);
- }
} else {
list.remove(insert);
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs