On 16/09/2008, Ryan McKinley <[EMAIL PROTECTED]> wrote:
> I've been going through the droids API trying to limit global access.  For
> an inability to explain all my thoughts, I put a functional sketch on:
>
>   http://svn.apache.org/viewvc?view=rev&revision=695984
>
>  I'm not totally happy with the names, but its a start...
>
>  Some of the big changes to note:
>
>  * The task management stuff is pulled out of AbstractDroid and added to
> TaskMaster.java / MultiThreadedTaskMaster.java
>   * the taskCompleted callback is removed and handled directly within
> MultiThreadedTaskMaster
>  * The worker interface is simplified to execute( Task )
>
> http://svn.apache.org/viewvc/labs/droids/trunk/src/core/java/org/apache/droidsX/api/Worker.java?view=markup&pathrev=695984
>
>
>  modify main() in FileSystemWalker.java to see it go.
>
>  The advantages to these API changes is that each component only has access
> to what it needs -- this will make testing much easier and more clear.
>
>  thoughts?

I've not looked at the code at all, but I'm +1 on making as much as
possible private.
Once code is released, it's difficult to remove access with risking
breaking things.

Also, please consider making classes immutable as far as possible - as
many fields as possible should be made final. This simplifies testing
and makes it easier to guarantee thread safety, should that be
required.

It's useful to document intended thread-safety as well.

>  ryan
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to