-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObserverPolicy.h
More file actions
43 lines (34 loc) · 1.16 KB
/
Copy pathObserverPolicy.h
File metadata and controls
43 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include"RxObserver/IncludeExtLibs.h"
#include"RxObserver/Export.h"
namespace BaseLib { namespace Concurrent
{
/** -------------------------------------------------------------------
Policy support in observer:
- Request last n signals to connecting observer
- Pull and push model support in observer (History)
- Max Signal speed (Interval)
- Filter based on content
- Min speed - Deadline - expecting value in configurable intervals. Use thread-pool's monitoring of policy violation and call-back upon interval violations.
- Content filter not here, In a config perhaps
------------------------------------------------------------------- */
class DLL_STATE ObserverPolicy
{
public:
ObserverPolicy();
virtual ~ObserverPolicy();
Policy::Replay Replay() const;
Policy::Deadline Deadline() const;
Policy::TimeBasedFilter MinSeparation() const;
FlowControllerPolicy FlowPolicy() const;
static ObserverPolicy Default()
{
return ObserverPolicy();
}
private:
Policy::Replay replay_;
Policy::Deadline deadline_;
Policy::TimeBasedFilter minSeparation_;
FlowControllerPolicy flowPolicy_;
};
}}