16 #ifndef BLOOMBERG_QUANTUM_CONFIGURATION_H 17 #define BLOOMBERG_QUANTUM_CONFIGURATION_H 19 #include <quantum/quantum_thread_traits.h> 124 int _numCoroutineThreads{-1};
125 int _numIoThreads{5};
126 bool _pinCoroutineThreadsToCores{
false};
127 bool _loadBalanceSharedIoQueues{
false};
128 std::chrono::milliseconds _loadBalancePollIntervalMs{100};
130 size_t _loadBalancePollIntervalNumBackoffs{0};
131 std::pair<int, int> _coroQueueIdRangeForAny{-1, -1};
136 #include <quantum/impl/quantum_configuration_impl.h> 138 #endif //BLOOMBERG_QUANTUM_CONFIGURATION_H size_t getLoadBalancePollIntervalNumBackoffs() const
Get the number of backoffs used.
Definition: quantum_buffer_impl.h:22
void setNumIoThreads(int num)
Set the number of threads running IO tasks.
int getNumIoThreads() const
Get the number of IO threads.
std::chrono::milliseconds getLoadBalancePollIntervalMs() const
Get load balance shared queue poll interval.
void setCoroQueueIdRangeForAny(const std::pair< int, int > &coroQueueIdRangeForAny)
Sets the range of coroutine queueIds covered by IQueue::QueueId::Any when using Dispatcher::post.
bool getLoadBalanceSharedIoQueues() const
Check if IO shared queues are load balanced or not.
void setNumCoroutineThreads(int num)
Set the number of threads running coroutines.
void setPinCoroutineThreadsToCores(bool value)
Indicate if coroutine threads should be pinned to a core.
void setLoadBalancePollIntervalMs(std::chrono::milliseconds interval)
Set the interval between IO thread polls.
bool getPinCoroutineThreadsToCores() const
Check to see if coroutine threads are pinned to cores or not.
static const std::string & getJsonSchema()
Get the JSON schema corresponding to this configuration object.
Definition: quantum_configuration.h:31
void setLoadBalanceSharedIoQueues(bool value)
Load balancee the shared IO queues.
void setLoadBalancePollIntervalNumBackoffs(size_t numBackoffs)
Set the number of backoffs.
static const std::string & getJsonSchemaUri()
Get the schema URI used to resolve remote JSON references '$ref'.
BackoffPolicy getLoadBalancePollIntervalBackoffPolicy() const
Get the backoff policy in load balance mode.
int getNumCoroutineThreads() const
Get the number of coroutine threads.
BackoffPolicy
Definition: quantum_configuration.h:34
void setLoadBalancePollIntervalBackoffPolicy(BackoffPolicy policy)
Set a backoff policy for the shared queue polling interval.
const std::pair< int, int > & getCoroQueueIdRangeForAny() const
Gets the range [minQueueId, maxQueueId] of coroutine queueIds covered by IQueue::QueueId::Any by the ...