Mercurial > hg > orthanc-transfers
comparison Plugin/PluginContext.h @ 55:b09adb6aa199
new PeerConnectivityTimeout configuration
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 06 Feb 2023 09:17:36 +0100 |
parents | 44a0430d7899 |
children | 1e396fb509ca |
comparison
equal
deleted
inserted
replaced
54:5915547fa6f2 | 55:b09adb6aa199 |
---|---|
40 | 40 |
41 // Configuration | 41 // Configuration |
42 size_t threadsCount_; | 42 size_t threadsCount_; |
43 size_t targetBucketSize_; | 43 size_t targetBucketSize_; |
44 unsigned int maxHttpRetries_; | 44 unsigned int maxHttpRetries_; |
45 unsigned int peerConnectivityTimeout_; | |
45 | 46 |
46 PluginContext(size_t threadsCount, | 47 PluginContext(size_t threadsCount, |
47 size_t targetBucketSize, | 48 size_t targetBucketSize, |
48 size_t maxPushTransactions, | 49 size_t maxPushTransactions, |
49 size_t memoryCacheSize, | 50 size_t memoryCacheSize, |
50 unsigned int maxHttpRetries); | 51 unsigned int maxHttpRetries, |
52 unsigned int peerConnectivityTimeout); | |
51 | 53 |
52 static std::unique_ptr<PluginContext>& GetSingleton(); | 54 static std::unique_ptr<PluginContext>& GetSingleton(); |
53 | 55 |
54 public: | 56 public: |
55 OrthancInstancesCache& GetCache() | 57 OrthancInstancesCache& GetCache() |
85 unsigned int GetMaxHttpRetries() const | 87 unsigned int GetMaxHttpRetries() const |
86 { | 88 { |
87 return maxHttpRetries_; | 89 return maxHttpRetries_; |
88 } | 90 } |
89 | 91 |
92 unsigned int GetPeerConnectivityTimeout() const | |
93 { | |
94 return peerConnectivityTimeout_; | |
95 } | |
96 | |
90 static void Initialize(size_t threadsCount, | 97 static void Initialize(size_t threadsCount, |
91 size_t targetBucketSize, | 98 size_t targetBucketSize, |
92 size_t maxPushTransactions, | 99 size_t maxPushTransactions, |
93 size_t memoryCacheSize, | 100 size_t memoryCacheSize, |
94 unsigned int maxHttpRetries); | 101 unsigned int maxHttpRetries, |
102 unsigned int peerConnectivityTimeout); | |
95 | 103 |
96 static PluginContext& GetInstance(); | 104 static PluginContext& GetInstance(); |
97 | 105 |
98 static void Finalize(); | 106 static void Finalize(); |
99 }; | 107 }; |