Ydb.RateLimiter.HierarchicalDrrSettings
*/
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 double max_units_per_second = 1;
*/
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 double max_burst_size_coefficient = 2;
*/
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 double prefetch_coefficient = 3;
*/
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 double prefetch_watermark = 4;
*/
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 double max_units_per_second = 1;
* @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 double max_units_per_second = 1;
* @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 double max_burst_size_coefficient = 2;
* @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 double max_burst_size_coefficient = 2;
* @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 double prefetch_coefficient = 3;
* @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 double prefetch_coefficient = 3;
* @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 double prefetch_watermark = 4;
* @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 double prefetch_watermark = 4;
* @param float $var
* @return $this
*/
public function setPrefetchWatermark($var)
{
GPBUtil::checkDouble($var);
$this->prefetch_watermark = $var;
return $this;
}
}