Re: maxEntries in contents()

Stefan Schulz <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
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 ;)

Cheers,
Stefan

===========================================================================
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.