• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Observer pattern problem

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am writing util to monitor OS performance. I have number of agents to collect statistics(io, cpu, memory etc.) I wanted to have one gateway to send this stats to my server(stats are collected on the remote host). In order to do it clean, I used Observer pattern. However, I ran in to problems. It looks like if the Observer does not get the value of changed Observable object befor it was reset to a new one, I loose the value.
Is there any queue mechanism that has to be enabled?
(Each agent runs in the seperate thread asynch. I used one observer for all agents. The logic in observer is very simple, I take the value an place it on a message queue(not JMS).)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic