123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_coordination.proto
- namespace Ydb\Coordination;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- **
- * Configuration settings for a coordination node
- *
- * Generated from protobuf message <code>Ydb.Coordination.Config</code>
- */
- class Config extends \Google\Protobuf\Internal\Message
- {
- /**
- * Initialized on creation, cannot be set
- *
- * Generated from protobuf field <code>string path = 1;</code>
- */
- protected $path = '';
- /**
- * Period in milliseconds for self-checks (default 1 second)
- *
- * Generated from protobuf field <code>uint32 self_check_period_millis = 2;</code>
- */
- protected $self_check_period_millis = 0;
- /**
- * Grace period for sessions on leader change (default 10 seconds)
- *
- * Generated from protobuf field <code>uint32 session_grace_period_millis = 3;</code>
- */
- protected $session_grace_period_millis = 0;
- /**
- * Concistency mode for read operations
- *
- * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode read_consistency_mode = 4;</code>
- */
- protected $read_consistency_mode = 0;
- /**
- * Consistency mode for attach operations
- *
- * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode attach_consistency_mode = 5;</code>
- */
- protected $attach_consistency_mode = 0;
- /**
- * Rate limiter counters mode
- *
- * Generated from protobuf field <code>.Ydb.Coordination.RateLimiterCountersMode rate_limiter_counters_mode = 6;</code>
- */
- protected $rate_limiter_counters_mode = 0;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $path
- * Initialized on creation, cannot be set
- * @type int $self_check_period_millis
- * Period in milliseconds for self-checks (default 1 second)
- * @type int $session_grace_period_millis
- * Grace period for sessions on leader change (default 10 seconds)
- * @type int $read_consistency_mode
- * Concistency mode for read operations
- * @type int $attach_consistency_mode
- * Consistency mode for attach operations
- * @type int $rate_limiter_counters_mode
- * Rate limiter counters mode
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbCoordination::initOnce();
- parent::__construct($data);
- }
- /**
- * Initialized on creation, cannot be set
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Initialized on creation, cannot be set
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setPath($var)
- {
- GPBUtil::checkString($var, True);
- $this->path = $var;
- return $this;
- }
- /**
- * Period in milliseconds for self-checks (default 1 second)
- *
- * Generated from protobuf field <code>uint32 self_check_period_millis = 2;</code>
- * @return int
- */
- public function getSelfCheckPeriodMillis()
- {
- return $this->self_check_period_millis;
- }
- /**
- * Period in milliseconds for self-checks (default 1 second)
- *
- * Generated from protobuf field <code>uint32 self_check_period_millis = 2;</code>
- * @param int $var
- * @return $this
- */
- public function setSelfCheckPeriodMillis($var)
- {
- GPBUtil::checkUint32($var);
- $this->self_check_period_millis = $var;
- return $this;
- }
- /**
- * Grace period for sessions on leader change (default 10 seconds)
- *
- * Generated from protobuf field <code>uint32 session_grace_period_millis = 3;</code>
- * @return int
- */
- public function getSessionGracePeriodMillis()
- {
- return $this->session_grace_period_millis;
- }
- /**
- * Grace period for sessions on leader change (default 10 seconds)
- *
- * Generated from protobuf field <code>uint32 session_grace_period_millis = 3;</code>
- * @param int $var
- * @return $this
- */
- public function setSessionGracePeriodMillis($var)
- {
- GPBUtil::checkUint32($var);
- $this->session_grace_period_millis = $var;
- return $this;
- }
- /**
- * Concistency mode for read operations
- *
- * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode read_consistency_mode = 4;</code>
- * @return int
- */
- public function getReadConsistencyMode()
- {
- return $this->read_consistency_mode;
- }
- /**
- * Concistency mode for read operations
- *
- * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode read_consistency_mode = 4;</code>
- * @param int $var
- * @return $this
- */
- public function setReadConsistencyMode($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Coordination\ConsistencyMode::class);
- $this->read_consistency_mode = $var;
- return $this;
- }
- /**
- * Consistency mode for attach operations
- *
- * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode attach_consistency_mode = 5;</code>
- * @return int
- */
- public function getAttachConsistencyMode()
- {
- return $this->attach_consistency_mode;
- }
- /**
- * Consistency mode for attach operations
- *
- * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode attach_consistency_mode = 5;</code>
- * @param int $var
- * @return $this
- */
- public function setAttachConsistencyMode($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Coordination\ConsistencyMode::class);
- $this->attach_consistency_mode = $var;
- return $this;
- }
- /**
- * Rate limiter counters mode
- *
- * Generated from protobuf field <code>.Ydb.Coordination.RateLimiterCountersMode rate_limiter_counters_mode = 6;</code>
- * @return int
- */
- public function getRateLimiterCountersMode()
- {
- return $this->rate_limiter_counters_mode;
- }
- /**
- * Rate limiter counters mode
- *
- * Generated from protobuf field <code>.Ydb.Coordination.RateLimiterCountersMode rate_limiter_counters_mode = 6;</code>
- * @param int $var
- * @return $this
- */
- public function setRateLimiterCountersMode($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Coordination\RateLimiterCountersMode::class);
- $this->rate_limiter_counters_mode = $var;
- return $this;
- }
- }
|