PageRenderTime 22ms CodeModel.GetById 8ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

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