21 namespace ExecutorResourceMgr_Namespace {
98 const bool cap_at_total_available)
const;
122 size_t constant_grant);
134 const double ratio_grant);
198 : resource_type(resource_type)
199 , concurrency_policy(concurrency_policy)
200 , oversubscription_concurrency_policy(oversubscription_concurrency_policy) {}
bool operator==(const ConcurrentResourceGrantPolicy &rhs) const
ResourceConcurrencyPolicy
Specifies whether grants for a specified resource can be made concurrently (ALLOW_CONCURRENT_REQEUSTS...
size_t get_grant_quantity(const size_t total_resource_quantity) const
Used to calculate the maximum quantity that can be granted of the resource.
ResourceType resource_type
The type of a resource this concurrent resource grant policy pertains to.
ResourceGrantPolicySizeType
The sizing type for a ResourceGrantPolicy of a given resource type, specifying whether resource grant...
ResourceType
Stores the resource type for a ExecutorResourcePool request.
Specifies the policies for resource grants in the presence of other requests, both under situations o...
ResourceGrantPolicy gen_unlimited_resource_grant_policy(const ResourceSubtype resource_subtype)
Generates a ResourceGrantPolicy with ResourceGrantPolicySizeType::UNLIMITED
ResourceSubtype
Stores the resource sub-type for a ExecutorResourcePool request.
ResourceConcurrencyPolicy concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
std::string get_resouce_concurrency_policy_string(const ResourceConcurrencyPolicy &resource_concurrency_policy)
ResourceGrantPolicy gen_ratio_resource_grant_policy(const ResourceSubtype resource_subtype, const double ratio_grant)
Generates a ResourceGrantPolicy with ResourceGrantPolicySizeType::RATIO_TO_TOTAL
ResourceGrantSizeInfo(const double ratio_to_total)
ResourceGrantSizeInfo size_info
std::string to_string() const
ResourceConcurrencyPolicy oversubscription_concurrency_policy
The grant policy in effect when there are concurrent requests for the resource specified by resource_...
Specifies the policy for granting a resource of a specific ResourceSubtype. Note that this policy onl...
std::string to_string() const
ResourceGrantPolicy gen_constant_resource_grant_policy(const ResourceSubtype resource_subtype, const size_t constant_grant)
Generates a ResourceGrantPolicy with ResourceGrantPolicySizeType::CONSTANT
ResourceSubtype resource_subtype
ConcurrentResourceGrantPolicy(const ResourceType resource_type, const ResourceConcurrencyPolicy concurrency_policy, const ResourceConcurrencyPolicy oversubscription_concurrency_policy)
ConcurrentResourceGrantPolicy()
ResourceGrantSizeInfo(const size_t constant)
ResourceGrantPolicySizeType policy_size_type