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.
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. 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. --gj -- Freesites (0.3) freenet:MSK at SSK@enI8YFo3gj8UVh-Au0HpKMftf6QQAgE/homepage// (0.4) freenet:SSK at npfV5XQijFkF6sXZvuO0o~kG4wEPAgM/homepage// _______________________________________________ Devl mailing list Devl at freenetproject.org http://lists.freenetproject.org/mailman/listinfo/devl
