Re: maxEntries in contents()

"John McClain - Sun Microsystems, Inc." <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
I have to admit, when I read "the maximum number of entries to remove
from the set via MatchSet.next calls" in Dan's message (for some reason
I got Dan's message first....) I was a bit confused too....

Not sure why I didn't write something like "the maximum number of
entries to be yielded by MatchSet.next calls", or maybe "the maximum
number of entries to return before the MatchSet is considered
exhausted". I suspect I had latched onto the idea of next deleting
entries from the match set and wanted to stick with that notion.

As for modifying the JavaDoc I need to think about that. There is the
procedural issue that it is now an approved community standard and
certain types of changes would require a vote. More deeply we (Sun's
Jini team) try to keep non-normative text (like motivations, uses cases,
examples, etc.) out of our specs.

One idea that does appeal to me is writing some sort of companion
document to the JavaSpace05/MatchSet/AvailabilityEvent JavaDoc that can
include non-normative text, be less precise, and more user oriented. I
suspect it would focus on the expected usage models. Not sure what would
be the best way to make this new document visible (then there is the
time problem too)

Stefan Schulz wrote:
> Dan Creswell wrote:
>
>> As the JavaDoc says:
>> "the maximum number of entries to remove from the set via MatchSet.next
>> calls".
>
>
> I still find this sentence confusing :)
> Would be great to add your explanation to the Javadoc for contents() at
> this point. The part "to remove from the set ..." does not really help.
> It's more about defining the (fixed) capacity of a MatchSet, at least
> from the usage point of view.
>
>> Which means you can expect to get at most the specified number of
>> Entry's from next() (you might actually get fewer than that).
>>
>> This parameter allows you to reduce your exposure to issues of memory
>> consumption where a MatchSet becomes too large to maintain on a client
>> or in the space back-end itself.
>>
>> If you want all available Entry's you'd pass in Long.MAX_VALUE.
>
>
> Ok, thanks. That should be enough of entries to iterate on ;)

--
BTW, if you want to reply to this message, please direct your reply
to the list, thanks

John McClain                                    [email protected]
Sun Microsystems, Inc.
Burlington, MA

A business that makes nothing but money, is a poor business.
    - Henry Ford

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html

JDC members can download the JavaSpaces(tm) Technology from:
http://developer.java.sun.com/developer/products/jini/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.