* Matthew Toseland <[EMAIL PROTECTED]> [2008-08-22 16:17:11]:

> On Friday 22 August 2008 15:21, Florent Daignière wrote:
> > * Matthew Toseland <[EMAIL PROTECTED]> [2008-08-22 14:29:40]:
> > 
> > > On Sunday 17 August 2008 11:15, [EMAIL PROTECTED] wrote:
> > > > Author: nextgens
> > > > Date: 2008-08-17 10:15:25 +0000 (Sun, 17 Aug 2008)
> > > > New Revision: 21949
> > > > 
> > > > Modified:
> > > >    trunk/freenet/src/freenet/support/io/ArrayBucketFactory.java
> > > >    trunk/freenet/src/freenet/support/io/TempBucketFactory.java
> > > > Log:
> > > > Fix the build;
> > > > 
> > > > Commit the beginning of what will be the temporary bucket ageing code
> > > > 
> > > > Modified: trunk/freenet/src/freenet/support/io/ArrayBucketFactory.java
> > > > ===================================================================
> > > > --- trunk/freenet/src/freenet/support/io/ArrayBucketFactory.java        
> 2008-08-17 
> > > 10:12:46 UTC (rev 21948)
> > > > +++ trunk/freenet/src/freenet/support/io/ArrayBucketFactory.java        
> 2008-08-17 
> > > 10:15:25 UTC (rev 21949)
> > > > @@ -11,11 +11,11 @@
> > > >  public class ArrayBucketFactory implements BucketFactory {
> > > >  
> > > >         public Bucket makeBucket(long size) throws IOException {
> > > > -               return new ArrayBucket();
> > > > +               return new ArrayBucket(size);
> > > >         }
> > > >  
> > > >         public void freeBucket(Bucket b) throws IOException {
> > > > -               // Do nothing
> > > > +               b.free();
> > > >         }
> > > >  
> > > >  }
> > > > 
> > > > Modified: trunk/freenet/src/freenet/support/io/TempBucketFactory.java
> > > > ===================================================================
> > > > --- trunk/freenet/src/freenet/support/io/TempBucketFactory.java 
> 2008-08-17 
> > > 10:12:46 UTC (rev 21948)
> > > > +++ trunk/freenet/src/freenet/support/io/TempBucketFactory.java 
> 2008-08-17 
> > > 10:15:25 UTC (rev 21949)
> > > > @@ -1,3 +1,6 @@
> > > > +/* This code is part of Freenet. It is distributed under the GNU 
> General
> > > > + * Public License, version 2 (or at your option any later version). See
> > > > + * http://www.gnu.org/ for further details of the GPL. */
> > > >  package freenet.support.io;
> > > >  
> > > >  import freenet.crypt.RandomSource;
> > > > @@ -6,32 +9,77 @@
> > > >  import freenet.support.api.Bucket;
> > > >  import freenet.support.api.BucketFactory;
> > > >  
> > > > -/*
> > > > - * This code is part of FProxy, an HTTP proxy server for Freenet. It is
> > > > - * distributed under the GNU Public Licence (GPL) version 2. See
> > > > - * http://www.gnu.org/ for further details of the GPL.
> > > > - */
> > > > +import java.io.InputStream;
> > > > +import java.io.OutputStream;
> > > >  import java.util.Random;
> > > >  
> > > >  /**
> > > >   * Temporary Bucket Factory
> > > > - * 
> > > > - * @author giannij
> > > >   */
> > > >  public class TempBucketFactory implements BucketFactory {
> > > > +       public class TempBucket implements Bucket {
> > > > +               private Bucket currentBucket;
> > > > +               
> > > > +               public TempBucket(Bucket cur) {
> > > > +                       this.currentBucket = cur;
> > > > +               }
> > > > +               
> > > > +               public final void migrateToFileBucket() throws 
> > > > IOException {
> > > > +                       RAMBucket ramBucket = null;
> > > > +                       synchronized(this) {
> > > > +                               if(!isRAMBucket())
> > > > +                                       return;
> > > >  
> > > > +                               ramBucket = (RAMBucket) currentBucket;
> > > > +                               TempFileBucket tempFB = new 
> > > TempFileBucket(filenameGenerator.makeRandomFilename(), filenameGenerator);
> > > 
> > > Not encrypted even if configured to be encrypted??? Or are you wrapping a 
> > > RAMBucket with a PaddedEphemerallyEncryptedBucket? (Seems rather 
> pointless!)
> > 
> > I am wrapping a RAMBucket into a PaddedEphemerallyEncryptedBucket; why
> > is that pointless?
> > 
> Because there is absolutely no reason to encrypt it while it is purely in 
> RAM. 
> *IF* it gets migrated to disk, then we might want to encrypt it, depending on 
> the config.

Okay, will get rid of it when I commit my new version of the
temp-bucket-factory.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to