123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_rate_limiter.proto
- namespace Ydb\RateLimiter;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Settings for hierarchical deficit round robin (HDRR) algorithm.
- *
- * Generated from protobuf message <code>Ydb.RateLimiter.HierarchicalDrrSettings</code>
- */
- class HierarchicalDrrSettings extends \Google\Protobuf\Internal\Message
- {
- /**
- * Resource consumption speed limit.
- * Value is required for root resource.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- *
- * Generated from protobuf field <code>double max_units_per_second = 1;</code>
- */
- protected $max_units_per_second = 0.0;
- /**
- * Maximum burst size of resource consumption across the whole cluster
- * divided by max_units_per_second.
- * Default value is 1.
- * This means that maximum burst size might be equal to max_units_per_second.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- *
- * Generated from protobuf field <code>double max_burst_size_coefficient = 2;</code>
- */
- protected $max_burst_size_coefficient = 0.0;
- /**
- * Prefetch in local bucket up to prefetch_coefficient*max_units_per_second units (full size).
- * Default value is inherited from parent or 0.2 for root.
- * Disables prefetching if any negative value is set
- * (It is useful to avoid bursts in case of large number of local buckets).
- *
- * Generated from protobuf field <code>double prefetch_coefficient = 3;</code>
- */
- protected $prefetch_coefficient = 0.0;
- /**
- * Prefetching starts if there is less than prefetch_watermark fraction of full local bucket left.
- * Default value is inherited from parent or 0.75 for root.
- * Must be nonnegative and less than or equal to 1.
- *
- * Generated from protobuf field <code>double prefetch_watermark = 4;</code>
- */
- protected $prefetch_watermark = 0.0;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type float $max_units_per_second
- * Resource consumption speed limit.
- * Value is required for root resource.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- * @type float $max_burst_size_coefficient
- * Maximum burst size of resource consumption across the whole cluster
- * divided by max_units_per_second.
- * Default value is 1.
- * This means that maximum burst size might be equal to max_units_per_second.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- * @type float $prefetch_coefficient
- * Prefetch in local bucket up to prefetch_coefficient*max_units_per_second units (full size).
- * Default value is inherited from parent or 0.2 for root.
- * Disables prefetching if any negative value is set
- * (It is useful to avoid bursts in case of large number of local buckets).
- * @type float $prefetch_watermark
- * Prefetching starts if there is less than prefetch_watermark fraction of full local bucket left.
- * Default value is inherited from parent or 0.75 for root.
- * Must be nonnegative and less than or equal to 1.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbRateLimiter::initOnce();
- parent::__construct($data);
- }
- /**
- * Resource consumption speed limit.
- * Value is required for root resource.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- *
- * Generated from protobuf field <code>double max_units_per_second = 1;</code>
- * @return float
- */
- public function getMaxUnitsPerSecond()
- {
- return $this->max_units_per_second;
- }
- /**
- * Resource consumption speed limit.
- * Value is required for root resource.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- *
- * Generated from protobuf field <code>double max_units_per_second = 1;</code>
- * @param float $var
- * @return $this
- */
- public function setMaxUnitsPerSecond($var)
- {
- GPBUtil::checkDouble($var);
- $this->max_units_per_second = $var;
- return $this;
- }
- /**
- * Maximum burst size of resource consumption across the whole cluster
- * divided by max_units_per_second.
- * Default value is 1.
- * This means that maximum burst size might be equal to max_units_per_second.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- *
- * Generated from protobuf field <code>double max_burst_size_coefficient = 2;</code>
- * @return float
- */
- public function getMaxBurstSizeCoefficient()
- {
- return $this->max_burst_size_coefficient;
- }
- /**
- * Maximum burst size of resource consumption across the whole cluster
- * divided by max_units_per_second.
- * Default value is 1.
- * This means that maximum burst size might be equal to max_units_per_second.
- * 0 is equivalent to not set.
- * Must be nonnegative.
- *
- * Generated from protobuf field <code>double max_burst_size_coefficient = 2;</code>
- * @param float $var
- * @return $this
- */
- public function setMaxBurstSizeCoefficient($var)
- {
- GPBUtil::checkDouble($var);
- $this->max_burst_size_coefficient = $var;
- return $this;
- }
- /**
- * Prefetch in local bucket up to prefetch_coefficient*max_units_per_second units (full size).
- * Default value is inherited from parent or 0.2 for root.
- * Disables prefetching if any negative value is set
- * (It is useful to avoid bursts in case of large number of local buckets).
- *
- * Generated from protobuf field <code>double prefetch_coefficient = 3;</code>
- * @return float
- */
- public function getPrefetchCoefficient()
- {
- return $this->prefetch_coefficient;
- }
- /**
- * Prefetch in local bucket up to prefetch_coefficient*max_units_per_second units (full size).
- * Default value is inherited from parent or 0.2 for root.
- * Disables prefetching if any negative value is set
- * (It is useful to avoid bursts in case of large number of local buckets).
- *
- * Generated from protobuf field <code>double prefetch_coefficient = 3;</code>
- * @param float $var
- * @return $this
- */
- public function setPrefetchCoefficient($var)
- {
- GPBUtil::checkDouble($var);
- $this->prefetch_coefficient = $var;
- return $this;
- }
- /**
- * Prefetching starts if there is less than prefetch_watermark fraction of full local bucket left.
- * Default value is inherited from parent or 0.75 for root.
- * Must be nonnegative and less than or equal to 1.
- *
- * Generated from protobuf field <code>double prefetch_watermark = 4;</code>
- * @return float
- */
- public function getPrefetchWatermark()
- {
- return $this->prefetch_watermark;
- }
- /**
- * Prefetching starts if there is less than prefetch_watermark fraction of full local bucket left.
- * Default value is inherited from parent or 0.75 for root.
- * Must be nonnegative and less than or equal to 1.
- *
- * Generated from protobuf field <code>double prefetch_watermark = 4;</code>
- * @param float $var
- * @return $this
- */
- public function setPrefetchWatermark($var)
- {
- GPBUtil::checkDouble($var);
- $this->prefetch_watermark = $var;
- return $this;
- }
- }
|