[concurrency-interest] question on concurrent HashMap
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.
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.
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.
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.
Concurrency-interest mailing list
Concurrency-interest at altair.cs.oswego.edu
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest