Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Threads and Synchronization and the fly likes Conversion from single-threaded to multi-threaded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Conversion from single-threaded to multi-threaded" Watch "Conversion from single-threaded to multi-threaded" New topic

Conversion from single-threaded to multi-threaded

Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Hi Geniuses,

Can anyone please help me out with this?

Design a framework (class diagram only) for converting a single-threaded process working on a collection of objects to multi-threaded process working on a batch from the collection. It should support the following features:
•Interfaces needed to be implemented by the client applications should be clearly defined by the framework.
•Logic of splitting and aggregating the objects from collection should be delegated to the client applications (i.e. this logic won’t be part of the framework)
•Should allow configuration of the number of threads as well as the batch size

Any sketchy idea would be fine.

K. Tsang

Joined: Sep 13, 2007
Posts: 2988

So do you currently have a single-threaded app or nothing at all?

K. Tsang JavaRanch SCJP5 SCJD OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5 OCMJEA5 part 1 part 2/3
Sai Swami
Ranch Hand

Joined: Sep 24, 2002
Posts: 51
Nothing exists right now. No sequence diagram is necessary. Only a class diagram.
Sean Doherty

Joined: Apr 29, 2009
Posts: 13
LOL, need a class diagram for the classes which don't exist! Do you own homework
I agree. Here's the link:
subject: Conversion from single-threaded to multi-threaded
It's not a secret anymore!