On Sep 17, 2008, at 5:25 AM, Thorsten Scherler wrote:
On Tue, 2008-09-16 at 14:57 -0400, Ryan McKinley wrote:
Looking over the API some more...
Is the (can the) Queue be Task agnostic? That is, can the Queue
accept any task even if invalid?
We do not have any criteria till now to decide whether a task is valid
or not.
Can we move all acceptX() methods?
Not sure what you mean, which acceptX method?
right now, QueueBean has: acceptSize(int i) and acceptDepth(int i)
Since the merge() function does not actually validate (nor do i think
it should), I think depth validation etc should go elsewhere.
I like this because it pushes validation logic elsewhere and makes
the
Queue very general. The only bit that does not work well is a
maxSize
concept on Queue. What is the expected behavior when you hit the
maxSize?
The default behavior ATM that we stop processing. We should at least
add
a note in the log to explain that we reached the defined max size and
will abort.
perhaps we can add an isFull() method to Queue
This will return if the queue size = maxSize?
yes, this way whoever is doing validation can ask if this will blow up
first.
hymm, maybe we do need acceptSize( x ) so that we can ask if a
Collection of tasks will fit?
Either way, I think the "do the Tasks fit?" question should be asked
to the Queue interface rather then the sub-implementation.
ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]