[concurrency-interest] question on concurrent HashMap

Amarnath Nanduri amar_nan at yahoo.com
Fri Nov 3 09:48:57 EST 2006


This is fantastic. I will definitely modify my application to follow this approach. Many thanks to all of you for your suggestions.
   
  Regards,
  Amar..

Tim Peierls <tim at peierls.net> wrote:
  And see section 9.4 of Java Concurrency in Practice for more on "push" and thread-safe data models.

--tim

  On 11/3/06, Joe Bowbeer <joe.bowbeer at gmail.com> wrote:  On 11/2/06, David Holmes <dcholmes at optusnet.com.au> wrote:
>
> I think what Joe was suggesting was a "push" style approach whereby
> the timer task, after getting updates from the database, posts an event 
> to the Swing event thread that then has each component update itself
> with the latest data from the map. That way there is no need for the UI
> updates to wait for fresh data.
>

Yes.

One way to implement this while still preserving the beneficial
separation of UI from data model would be to add support for listeners
to the manager.

Then the UI could register a special "relaying" listener that, when 
notified, would schedule (i.e., invokeLater) the appropriate update
task on the event thread.

--Joe
_______________________________________________
Concurrency-interest mailing list
Concurrency-interest at altair.cs.oswego.edu
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest




 
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low  PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20061103/477544d0/attachment.html 


More information about the Concurrency-interest mailing list