Config.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_coordination.proto
  4. namespace Ydb\Coordination;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. **
  10. * Configuration settings for a coordination node
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.Config</code>
  13. */
  14. class Config extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Initialized on creation, cannot be set
  18. *
  19. * Generated from protobuf field <code>string path = 1;</code>
  20. */
  21. protected $path = '';
  22. /**
  23. * Period in milliseconds for self-checks (default 1 second)
  24. *
  25. * Generated from protobuf field <code>uint32 self_check_period_millis = 2;</code>
  26. */
  27. protected $self_check_period_millis = 0;
  28. /**
  29. * Grace period for sessions on leader change (default 10 seconds)
  30. *
  31. * Generated from protobuf field <code>uint32 session_grace_period_millis = 3;</code>
  32. */
  33. protected $session_grace_period_millis = 0;
  34. /**
  35. * Concistency mode for read operations
  36. *
  37. * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode read_consistency_mode = 4;</code>
  38. */
  39. protected $read_consistency_mode = 0;
  40. /**
  41. * Consistency mode for attach operations
  42. *
  43. * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode attach_consistency_mode = 5;</code>
  44. */
  45. protected $attach_consistency_mode = 0;
  46. /**
  47. * Rate limiter counters mode
  48. *
  49. * Generated from protobuf field <code>.Ydb.Coordination.RateLimiterCountersMode rate_limiter_counters_mode = 6;</code>
  50. */
  51. protected $rate_limiter_counters_mode = 0;
  52. /**
  53. * Constructor.
  54. *
  55. * @param array $data {
  56. * Optional. Data for populating the Message object.
  57. *
  58. * @type string $path
  59. * Initialized on creation, cannot be set
  60. * @type int $self_check_period_millis
  61. * Period in milliseconds for self-checks (default 1 second)
  62. * @type int $session_grace_period_millis
  63. * Grace period for sessions on leader change (default 10 seconds)
  64. * @type int $read_consistency_mode
  65. * Concistency mode for read operations
  66. * @type int $attach_consistency_mode
  67. * Consistency mode for attach operations
  68. * @type int $rate_limiter_counters_mode
  69. * Rate limiter counters mode
  70. * }
  71. */
  72. public function __construct($data = NULL) {
  73. \GPBMetadata\Protos\YdbCoordination::initOnce();
  74. parent::__construct($data);
  75. }
  76. /**
  77. * Initialized on creation, cannot be set
  78. *
  79. * Generated from protobuf field <code>string path = 1;</code>
  80. * @return string
  81. */
  82. public function getPath()
  83. {
  84. return $this->path;
  85. }
  86. /**
  87. * Initialized on creation, cannot be set
  88. *
  89. * Generated from protobuf field <code>string path = 1;</code>
  90. * @param string $var
  91. * @return $this
  92. */
  93. public function setPath($var)
  94. {
  95. GPBUtil::checkString($var, True);
  96. $this->path = $var;
  97. return $this;
  98. }
  99. /**
  100. * Period in milliseconds for self-checks (default 1 second)
  101. *
  102. * Generated from protobuf field <code>uint32 self_check_period_millis = 2;</code>
  103. * @return int
  104. */
  105. public function getSelfCheckPeriodMillis()
  106. {
  107. return $this->self_check_period_millis;
  108. }
  109. /**
  110. * Period in milliseconds for self-checks (default 1 second)
  111. *
  112. * Generated from protobuf field <code>uint32 self_check_period_millis = 2;</code>
  113. * @param int $var
  114. * @return $this
  115. */
  116. public function setSelfCheckPeriodMillis($var)
  117. {
  118. GPBUtil::checkUint32($var);
  119. $this->self_check_period_millis = $var;
  120. return $this;
  121. }
  122. /**
  123. * Grace period for sessions on leader change (default 10 seconds)
  124. *
  125. * Generated from protobuf field <code>uint32 session_grace_period_millis = 3;</code>
  126. * @return int
  127. */
  128. public function getSessionGracePeriodMillis()
  129. {
  130. return $this->session_grace_period_millis;
  131. }
  132. /**
  133. * Grace period for sessions on leader change (default 10 seconds)
  134. *
  135. * Generated from protobuf field <code>uint32 session_grace_period_millis = 3;</code>
  136. * @param int $var
  137. * @return $this
  138. */
  139. public function setSessionGracePeriodMillis($var)
  140. {
  141. GPBUtil::checkUint32($var);
  142. $this->session_grace_period_millis = $var;
  143. return $this;
  144. }
  145. /**
  146. * Concistency mode for read operations
  147. *
  148. * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode read_consistency_mode = 4;</code>
  149. * @return int
  150. */
  151. public function getReadConsistencyMode()
  152. {
  153. return $this->read_consistency_mode;
  154. }
  155. /**
  156. * Concistency mode for read operations
  157. *
  158. * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode read_consistency_mode = 4;</code>
  159. * @param int $var
  160. * @return $this
  161. */
  162. public function setReadConsistencyMode($var)
  163. {
  164. GPBUtil::checkEnum($var, \Ydb\Coordination\ConsistencyMode::class);
  165. $this->read_consistency_mode = $var;
  166. return $this;
  167. }
  168. /**
  169. * Consistency mode for attach operations
  170. *
  171. * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode attach_consistency_mode = 5;</code>
  172. * @return int
  173. */
  174. public function getAttachConsistencyMode()
  175. {
  176. return $this->attach_consistency_mode;
  177. }
  178. /**
  179. * Consistency mode for attach operations
  180. *
  181. * Generated from protobuf field <code>.Ydb.Coordination.ConsistencyMode attach_consistency_mode = 5;</code>
  182. * @param int $var
  183. * @return $this
  184. */
  185. public function setAttachConsistencyMode($var)
  186. {
  187. GPBUtil::checkEnum($var, \Ydb\Coordination\ConsistencyMode::class);
  188. $this->attach_consistency_mode = $var;
  189. return $this;
  190. }
  191. /**
  192. * Rate limiter counters mode
  193. *
  194. * Generated from protobuf field <code>.Ydb.Coordination.RateLimiterCountersMode rate_limiter_counters_mode = 6;</code>
  195. * @return int
  196. */
  197. public function getRateLimiterCountersMode()
  198. {
  199. return $this->rate_limiter_counters_mode;
  200. }
  201. /**
  202. * Rate limiter counters mode
  203. *
  204. * Generated from protobuf field <code>.Ydb.Coordination.RateLimiterCountersMode rate_limiter_counters_mode = 6;</code>
  205. * @param int $var
  206. * @return $this
  207. */
  208. public function setRateLimiterCountersMode($var)
  209. {
  210. GPBUtil::checkEnum($var, \Ydb\Coordination\RateLimiterCountersMode::class);
  211. $this->rate_limiter_counters_mode = $var;
  212. return $this;
  213. }
  214. }