On Mon, Feb 04, 2002 at 04:42:29PM -0500, Gianni Johansson wrote:
> On Monday 04 February 2002 15:09, Tavin  wrote:
> > On Mon, Feb 04, 2002 at 01:38:26PM -0500, Gianni Johansson wrote:
> > > > > > > FSBucketFactory.FSBucket.resetWrite() doesn't work (NOP) and
> > > > > > > FSBucketFactory.FSBucket.size() returns the buffer size, not the
> > > > > > > amount of data in the bucket.
> > > > > >
> > > > > > Yeah, I know.  It's rather an unreasonable interface imho.  I have
> > > > > > never needed to use either of those methods.   Do you really need
> > > > > > them?
> > > > >
> > > > > Yes. They are used by client code. You use Bucket.size() yourself in
> > > > > InternalClient.  I don't think Bucket was ever intended to be used by
> > > > > core code (but I'm sure I will hear from Oskar if I am wrong ;-) ).
> > > >
> > > > But the way I use Bucket.size(), the value I want is the total buffer
> > > > size (i.e. after it's filled).
> > >
> > > No what you want is the amount of data in the bucket. There is no
> > > gaurantee that the bucket isn't bigger.
> >
> > When you obtain a Bucket from BucketFactory you are supposed to know
> > beforehand the length of the data.  So actually there is such a
> > guarantee.
> >
> No. You are only supposed to know the maximum size.  There is no need to 
> impose any other arbitrary constraint.

That's only true for the old semantics, not the BucketFactory/FSBucket
semantics.

> You are just being silly.  Don't start invoking rhetoric about optimal design 
> now.  You designed the client library, remember?   This is not the time to 
> talk about re-designing the client library (again). That would be an 
> incredible waste of time and limited resources.  

I'm not invoking rhetoric and I'm not suggesting rewriting the client
library at this time.  I am responsible for the design mistake I
mentioned (though I inherited it from the previous client code), and I'm
willing to admit to the error, that is all.

> Lets put this issue on hold until AFTER, the new DataStore code is debugged.
> 
> In the mean time, do whatever you like internally but don't hijack the 
> Bucket/BucketFactory symbols.

It's already done, and has been since last summer, so don't start
complaining now.  And you can't claim I've hijacked BucketFactory, only
that it was named wrong.

-tc


_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to