Samchon Framework for CPP
1.0.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
DistributedProcessBase.hpp
1
#pragma once
2
#include <samchon/API.hpp>
3
4
#include <samchon/HashMap.hpp>
5
#include <samchon/templates/distributed/DSInvokeHistory.hpp>
6
7
namespace
samchon
8
{
9
namespace
protocol
10
{
11
class
Invoke;
12
};
13
14
namespace
templates
15
{
16
namespace
distributed
17
{
18
class
DistributedProcess
;
19
class
DistributedSystem
;
20
21
namespace
base
22
{
23
class
DistributedProcessBase
24
{
25
friend
class
DistributedProcess
;
26
27
private
:
28
HashMap<size_t, std::shared_ptr<DSInvokeHistory>
> progress_list_;
29
HashMap<size_t, std::shared_ptr<DSInvokeHistory>
> history_list_;
30
31
double
resource;
32
bool
enforced_;
33
34
public
:
35
auto
getResource()
const
->
double
36
{
37
return
resource;
38
};
39
40
virtual
auto
sendData(std::shared_ptr<protocol::Invoke>,
double
) -> std::shared_ptr<DistributedSystem> = 0;
41
42
virtual
void
replyData(std::shared_ptr<protocol::Invoke>) = 0;
43
44
void
_Report_history(std::shared_ptr<DSInvokeHistory> history)
45
{
46
// ERASE FROM ORDINARY PROGRESS AND MIGRATE TO THE HISTORY
47
progress_list_.erase(history->getUID());
48
history_list_.emplace(history->getUID(), history);
49
};
50
};
51
};
52
};
53
};
54
};
samchon::templates::distributed::DistributedProcess
Definition:
DistributedProcess.hpp:45
samchon::templates::distributed::DistributedSystem
Definition:
DistributedSystem.hpp:51
samchon
Definition:
ByteArray.hpp:6
samchon::HashMap
Customized std::unordered_map.
Definition:
HashMap.hpp:103
cpp
samchon
templates
distributed
base
DistributedProcessBase.hpp
Generated by
1.8.11