comparison Plugin/PluginContext.cpp @ 10:c9e28e31262e

new option: MaxHttpRetries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Mar 2019 15:26:49 +0100
parents 7e207ade2f1a
children 34b1875c8e3a
comparison
equal deleted inserted replaced
9:7e207ade2f1a 10:c9e28e31262e
25 namespace OrthancPlugins 25 namespace OrthancPlugins
26 { 26 {
27 PluginContext::PluginContext(size_t threadsCount, 27 PluginContext::PluginContext(size_t threadsCount,
28 size_t targetBucketSize, 28 size_t targetBucketSize,
29 size_t maxPushTransactions, 29 size_t maxPushTransactions,
30 size_t memoryCacheSize) : 30 size_t memoryCacheSize,
31 unsigned int maxHttpRetries) :
31 pushTransactions_(maxPushTransactions), 32 pushTransactions_(maxPushTransactions),
32 semaphore_(threadsCount), 33 semaphore_(threadsCount),
33 threadsCount_(threadsCount), 34 threadsCount_(threadsCount),
34 targetBucketSize_(targetBucketSize) 35 targetBucketSize_(targetBucketSize),
36 maxHttpRetries_(maxHttpRetries)
35 { 37 {
36 pluginUuid_ = Orthanc::Toolbox::GenerateUuid(); 38 pluginUuid_ = Orthanc::Toolbox::GenerateUuid();
37 39
38 cache_.SetMaxMemorySize(memoryCacheSize); 40 cache_.SetMaxMemorySize(memoryCacheSize);
39 41
56 58
57 59
58 void PluginContext::Initialize(size_t threadsCount, 60 void PluginContext::Initialize(size_t threadsCount,
59 size_t targetBucketSize, 61 size_t targetBucketSize,
60 size_t maxPushTransactions, 62 size_t maxPushTransactions,
61 size_t memoryCacheSize) 63 size_t memoryCacheSize,
64 unsigned int maxHttpRetries)
62 { 65 {
63 GetSingleton().reset(new PluginContext(threadsCount, targetBucketSize, 66 GetSingleton().reset(new PluginContext(threadsCount, targetBucketSize,
64 maxPushTransactions, memoryCacheSize)); 67 maxPushTransactions, memoryCacheSize, maxHttpRetries));
65 } 68 }
66 69
67 70
68 PluginContext& PluginContext::GetInstance() 71 PluginContext& PluginContext::GetInstance()
69 { 72 {