SemaphoreSession.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. * Describes an owner or a waiter of this semaphore
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SemaphoreSession</code>
  13. */
  14. class SemaphoreSession extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * A monotonically increasing id which determines locking order
  18. *
  19. * Generated from protobuf field <code>uint64 order_id = 5;</code>
  20. */
  21. protected $order_id = 0;
  22. /**
  23. * An id of the session which tried to acquire the semaphore
  24. *
  25. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  26. */
  27. protected $session_id = 0;
  28. /**
  29. * A timeout in milliseconds for operation in waiters queue
  30. *
  31. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  32. */
  33. protected $timeout_millis = 0;
  34. /**
  35. * Number of tokens for an acquire operation
  36. *
  37. * Generated from protobuf field <code>uint64 count = 3;</code>
  38. */
  39. protected $count = 0;
  40. /**
  41. * User-defined data attached to the acquire operation
  42. *
  43. * Generated from protobuf field <code>bytes data = 4;</code>
  44. */
  45. protected $data = '';
  46. /**
  47. * Constructor.
  48. *
  49. * @param array $data {
  50. * Optional. Data for populating the Message object.
  51. *
  52. * @type int|string $order_id
  53. * A monotonically increasing id which determines locking order
  54. * @type int|string $session_id
  55. * An id of the session which tried to acquire the semaphore
  56. * @type int|string $timeout_millis
  57. * A timeout in milliseconds for operation in waiters queue
  58. * @type int|string $count
  59. * Number of tokens for an acquire operation
  60. * @type string $data
  61. * User-defined data attached to the acquire operation
  62. * }
  63. */
  64. public function __construct($data = NULL) {
  65. \GPBMetadata\Protos\YdbCoordination::initOnce();
  66. parent::__construct($data);
  67. }
  68. /**
  69. * A monotonically increasing id which determines locking order
  70. *
  71. * Generated from protobuf field <code>uint64 order_id = 5;</code>
  72. * @return int|string
  73. */
  74. public function getOrderId()
  75. {
  76. return $this->order_id;
  77. }
  78. /**
  79. * A monotonically increasing id which determines locking order
  80. *
  81. * Generated from protobuf field <code>uint64 order_id = 5;</code>
  82. * @param int|string $var
  83. * @return $this
  84. */
  85. public function setOrderId($var)
  86. {
  87. GPBUtil::checkUint64($var);
  88. $this->order_id = $var;
  89. return $this;
  90. }
  91. /**
  92. * An id of the session which tried to acquire the semaphore
  93. *
  94. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  95. * @return int|string
  96. */
  97. public function getSessionId()
  98. {
  99. return $this->session_id;
  100. }
  101. /**
  102. * An id of the session which tried to acquire the semaphore
  103. *
  104. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  105. * @param int|string $var
  106. * @return $this
  107. */
  108. public function setSessionId($var)
  109. {
  110. GPBUtil::checkUint64($var);
  111. $this->session_id = $var;
  112. return $this;
  113. }
  114. /**
  115. * A timeout in milliseconds for operation in waiters queue
  116. *
  117. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  118. * @return int|string
  119. */
  120. public function getTimeoutMillis()
  121. {
  122. return $this->timeout_millis;
  123. }
  124. /**
  125. * A timeout in milliseconds for operation in waiters queue
  126. *
  127. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  128. * @param int|string $var
  129. * @return $this
  130. */
  131. public function setTimeoutMillis($var)
  132. {
  133. GPBUtil::checkUint64($var);
  134. $this->timeout_millis = $var;
  135. return $this;
  136. }
  137. /**
  138. * Number of tokens for an acquire operation
  139. *
  140. * Generated from protobuf field <code>uint64 count = 3;</code>
  141. * @return int|string
  142. */
  143. public function getCount()
  144. {
  145. return $this->count;
  146. }
  147. /**
  148. * Number of tokens for an acquire operation
  149. *
  150. * Generated from protobuf field <code>uint64 count = 3;</code>
  151. * @param int|string $var
  152. * @return $this
  153. */
  154. public function setCount($var)
  155. {
  156. GPBUtil::checkUint64($var);
  157. $this->count = $var;
  158. return $this;
  159. }
  160. /**
  161. * User-defined data attached to the acquire operation
  162. *
  163. * Generated from protobuf field <code>bytes data = 4;</code>
  164. * @return string
  165. */
  166. public function getData()
  167. {
  168. return $this->data;
  169. }
  170. /**
  171. * User-defined data attached to the acquire operation
  172. *
  173. * Generated from protobuf field <code>bytes data = 4;</code>
  174. * @param string $var
  175. * @return $this
  176. */
  177. public function setData($var)
  178. {
  179. GPBUtil::checkString($var, False);
  180. $this->data = $var;
  181. return $this;
  182. }
  183. }