On Friday 27 March 2009 20:54:28 saces at freenetproject.org wrote: > Author: saces > Date: 2009-03-27 20:54:27 +0000 (Fri, 27 Mar 2009) > New Revision: 26249 > > Modified: > branches/db4o/freenet/src/freenet/client/async/SimpleManifestPutter.java > Log: > change variable from SFI to ClientPutState, so the PutHadler can hold a SingelFileInserter or a ContainerInserter
Why are you using a PutHandler for this job? PutHandler's just insert files external to the container - we have separate structures (*ByMetadata) for the container itself, shouldn't you do the same thing? > > Modified: branches/db4o/freenet/src/freenet/client/async/SimpleManifestPutter.java > =================================================================== > --- branches/db4o/freenet/src/freenet/client/async/SimpleManifestPutter.java 2009-03-27 20:25:14 UTC (rev 26248) > +++ branches/db4o/freenet/src/freenet/client/async/SimpleManifestPutter.java 2009-03-27 20:54:27 UTC (rev 26249) > @@ -88,7 +88,7 @@ > origSFI = null; > } > > - private SingleFileInserter origSFI; > + private ClientPutState origSFI; > private ClientPutState currentState; > private ClientMetadata cm; > private Metadata metadata; > @@ -105,7 +105,7 @@ > Logger.error(this, "metdata=" + metadata + " on > start(), should be impossible", new Exception("debug")); > return; > } > - SingleFileInserter sfi; > + ClientPutState sfi; > synchronized(this) { > sfi = origSFI; > currentState = sfi; > @@ -115,7 +115,7 @@ > container.activate(sfi, 1); > container.store(this); > } > - sfi.start(null, container, context); > + sfi.schedule(container, context); > if(persistent()) > container.deactivate(sfi, 1); > if(persistent) > @@ -459,7 +459,7 @@ > @Override > public void removeFrom(ObjectContainer container, ClientContext > context) { > if(logMINOR) Logger.minor(this, "Removing "+this); > - SingleFileInserter oldSFI; > + ClientPutState oldSFI; > ClientPutState oldState; > synchronized(this) { > oldSFI = origSFI; > > _______________________________________________ > cvs mailing list > cvs at freenetproject.org > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 835 bytes Desc: This is a digitally signed message part. URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20090401/40e5fe51/attachment.pgp>