/include/daemonManager.h

https://github.com/deltaforge/nebu-app-hadoop · C Header · 49 lines · 36 code · 13 blank · 0 comment · 0 complexity · 1a5b1dd4a689ea16f581808da89fb42e MD5 · raw file

  1. #ifndef HADOOPNEBU_DAEMONMANAGER_H_
  2. #define HADOOPNEBU_DAEMONMANAGER_H_
  3. #include "nebu-app-framework/daemonCollection.h"
  4. #include "nebu-app-framework/daemonManager.h"
  5. #include "nebu/virtualMachine.h"
  6. #include <string>
  7. #include <vector>
  8. namespace nebu
  9. {
  10. namespace app
  11. {
  12. namespace hadoop
  13. {
  14. class DaemonDeployer;
  15. class DaemonManager : public framework::DaemonManager
  16. {
  17. public:
  18. DaemonManager(std::shared_ptr<framework::DaemonCollection> daemonCollection,
  19. std::shared_ptr<DaemonDeployer> deployer);
  20. virtual ~DaemonManager() { };
  21. virtual void refreshDaemons();
  22. virtual void deployDaemons();
  23. virtual void newVMAdded(std::shared_ptr<nebu::common::VirtualMachine> vm);
  24. virtual void existingVMChanged(std::shared_ptr<nebu::common::VirtualMachine> vm,
  25. const framework::VMEvent event);
  26. virtual void oldVMRemoved(const nebu::common::VirtualMachine &vm);
  27. protected:
  28. std::shared_ptr<framework::DaemonCollection> daemonCollection;
  29. std::shared_ptr<DaemonDeployer> deployer;
  30. bool generatedConfiguration;
  31. void prepareConfiguration();
  32. };
  33. }
  34. }
  35. }
  36. #endif