Mercurial > hg > blitz_condensed
view test/org/dancres/blitz/Clean.java @ 3:d3ec5ebc3dba
Fix up a small race-condition and and a todo for thread-safety in MatchSetImpl.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 25 Apr 2009 08:38:27 +0100 |
parents | 3dc0c5604566 |
children |
line wrap: on
line source
package org.dancres.blitz; import net.jini.core.entry.Entry; import net.jini.core.lease.Lease; import org.dancres.blitz.mangler.*; import org.dancres.blitz.disk.Disk; import org.dancres.blitz.disk.DiskTxn; public class Clean { public static void main(String args[]) { try { EntryMangler myMangler = new EntryMangler(); System.out.println("Start space"); SpaceImpl mySpace = new SpaceImpl(null); while (true) { MangledEntry myEntry = mySpace.take(MangledEntry.NULL_TEMPLATE, null, 1000); if (myEntry == null) break; else System.out.println("Took: " + myMangler.unMangle(myEntry)); } mySpace.stop(); } catch (Exception anE) { System.err.println("Got exception :("); anE.printStackTrace(System.err); } } }