Jpool updated to Scala 2.8
I have finished updating jpool to Scala 2.8 (currently 2.8.0.RC1). I will leave this development on the 'try-2.8' branch until 2.8.0 is released. However, now that this seems to be working fully, I will not be backporting changes to the old branch.
I ran into some interesting problems with the conversion. The most tedious to fix was that Scala 2.8 doesn't auto import parent packages from an import statement. Once I figured out the correct way of handling this, things got a lot better. Basically: package org.davidb.jpool.tools
package org.davidb.jpool package tools and this will auto-import both 'org.davidb.jpool' as well as the tools packages. The other main effort was because of the conversion of the containers. Since jpool creates several of it's own containers, these had to be updated to use the new naming system. Stacks have been fixed to actually be implemented as stacks, which ended up simplifying some of the code that used them. Previously, I was using streams to iterate the directory trees in the filesystem. Moving to 2.8 provoked some space leaks in my code. However, the new collection classes make Iterator as convenient to use as streams, while nicely maintaining the overwriting behaviour of the iterator. I converted all of the Streams into Iterators and eliminated the space leaks. This seems similar to Clojure, and streams are rather hard to not have space leaks on the JVM, since it doesn't seem very good about determining lifetime of locals. Beyond this, I've now implemented a 'clone' tool. This tool individual snapshots to be migrated from one pool to another. This can be used as a kind of poor-man's garbage collection. I've been using this to make weekly pool snapshots, which helps keep this weekly pool smaller, since it has fewer snapshots in it.
