Cedric Hyppolite wrote:
I see two ways:

- Get at most X latest articles: fetching the message headers using (last - X) or first -> last as the range in NNTPFolder.getMessages()

- Get exactly the X latest articles: fetching the message headers using first -> last and keeping only the latest X messages

Either way, the internal cache is used to prevent queries for previously downloaded messages. Once the getMessages() returned the array of X recent messages, their full content can be downloaded using fetch(Message[], FetchProfile)

There would be one property (for example 'mail.nntp.limittolatest' ) that states the number of messages to download at most or exactly. This property should be read each time before being used so that a client could change the value before fetching each newsgroup.

I kind of see where you're going with this, but doesn't it change the semantics of getMessages? Wouldn't it be better just to concentrate on optimising the range passed to xhdr, and instead manage the messages' RECENT flags to indicate which ones were new in the last call?

I'm not sure at all about returning fewer messages than are actually present.
--
犬 Chris Burdess
  "They that can give up essential liberty to obtain a little safety
  deserve neither liberty nor safety." - Benjamin Franklin




_______________________________________________
Classpathx-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpathx-discuss

Reply via email to