> -----Urspr?ngliche Nachricht-----
> Von: "Matthew Toseland" <toad at amphibian.dyndns.org>
> Gesendet: 01.04.09 21:20:42
> An: devl at freenetproject.org
> Betreff: Re: [freenet-dev] [freenet-cvs] r26249 -
> branches/db4o/freenet/src/freenet/client/async
> 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?
The container creation&insertion is moved to ContainerPutter (it composes the
archive/metadata itself and hand off the archive to SingleFileInserter).
So the (sub)container insert is treated as external at this point. (And a big
site/tree will produce a lot of (sub)containers)
> >
> > 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
> >
> >
>
>
>
>
> <hr>
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
_______________________________________________________________________
DSL zum Nulltarif + 20 Euro Extrapr?mie bei Online-Bestellung ?ber die
DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a