james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Rationale behind explicit setLastUpdated in MailImpl writeobject sought.
Date Wed, 22 Oct 2003 22:19:45 GMT
> > Mind you, I'd also like to see Spool.accept() return the message, not
the
> > key.  There are exactly two calls to Spool.accept()/accept(long) in
James.
> > In both cases, we immediately follow up by retrieving the message, but
we
> > have a much more complex synchronization process because of the two
stage
> > access method.

> Agreed.

> But to address the fundamental challenge, I would say this is a good use
> of mail attributes.  Sounds like we would need to provide a query
> interface on the repository for this, but really you want to set a date
> on the mail that is not last updated, but independent of any data we
> store right now.

I had thought of that, but it would mean that:

  (a) scheduling would only work on systems with attributes enabled
  (b) scheduling would require reading the attributes, too.

We already have the lastUpdate time.  We can easily add the retry count to
the same query, which we'll want, anyway.  From that, we can compute the
delivery time.

What we could do is establish something like:

   Spool.accept(Filter filter)

Spool.Filter would be an static inner interface of the Spool interface, so
we tie the concepts.  If we have a Spool.TimeFilter interface, we could
check for that interface, which just tells us that all we need are the time
and retry count.  Then we can call it, perhaps TimeFilter.accept(long time,
int retries) to see if the current pending message is suitable.  I dislike
the lack of polymorphism, but the JDBC Spool uses a very lightweight object
that isn't a full MailImpl.

Anyhow, that's an idea.  Seems like something useful (and reusable) there if
we tweak it.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message