You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2003/09/23 20:39:49 UTC
RE: [PATCH] FIFO file repository
Diego,
I received the copy of the patch that you sent. Yes, you have to be
subscribed to the mailing list, or your messages will require moderation.
With respect to the patch, the only functional change is:
+ Collections.sort(clone);
Have you been finding a problem? In the event of very large directories, I
don't know that we should spend the CPU that way if we don't have a need.
--- Noel
-----Original Message-----
From: Diego Castillo [mailto:diego.castillo@inexbee.com]
Sent: Monday, September 22, 2003 3:55
To: server-dev@james.apache.org
Cc: Diego Castillo, INEXBEE
Subject: [PATCH] FIFO file repository
Hi all,
Here goes a patch for enforcing FIFO ordering on file repositories.
Hopefully it will make it into version 2.2.0.
Regards,
Diego
--- AvalonMailRepository.java.orig Wed Aug 06 09:41:56 2003
+++ AvalonMailRepository.java Fri Sep 19 18:18:26 2003
@@ -431,12 +431,13 @@
*
*/
public Iterator list() {
- // Fix ConcurrentModificationException by cloning
+ // Fix ConcurrentModificationException by cloning
// the keyset before getting an iterator
- final Collection clone;
+ final ArrayList clone;
synchronized(keys) {
clone = new ArrayList(keys);
}
+ Collections.sort(clone);
return clone.iterator();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org