123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <?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;
- /**
- **
- * Describes an owner or a waiter of this semaphore
- *
- * Generated from protobuf message <code>Ydb.Coordination.SemaphoreSession</code>
- */
- class SemaphoreSession extends \Google\Protobuf\Internal\Message
- {
- /**
- * A monotonically increasing id which determines locking order
- *
- * Generated from protobuf field <code>uint64 order_id = 5;</code>
- */
- protected $order_id = 0;
- /**
- * An id of the session which tried to acquire the semaphore
- *
- * Generated from protobuf field <code>uint64 session_id = 1;</code>
- */
- protected $session_id = 0;
- /**
- * A timeout in milliseconds for operation in waiters queue
- *
- * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
- */
- protected $timeout_millis = 0;
- /**
- * Number of tokens for an acquire operation
- *
- * Generated from protobuf field <code>uint64 count = 3;</code>
- */
- protected $count = 0;
- /**
- * User-defined data attached to the acquire operation
- *
- * Generated from protobuf field <code>bytes data = 4;</code>
- */
- protected $data = '';
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $order_id
- * A monotonically increasing id which determines locking order
- * @type int|string $session_id
- * An id of the session which tried to acquire the semaphore
- * @type int|string $timeout_millis
- * A timeout in milliseconds for operation in waiters queue
- * @type int|string $count
- * Number of tokens for an acquire operation
- * @type string $data
- * User-defined data attached to the acquire operation
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbCoordination::initOnce();
- parent::__construct($data);
- }
- /**
- * A monotonically increasing id which determines locking order
- *
- * Generated from protobuf field <code>uint64 order_id = 5;</code>
- * @return int|string
- */
- public function getOrderId()
- {
- return $this->order_id;
- }
- /**
- * A monotonically increasing id which determines locking order
- *
- * Generated from protobuf field <code>uint64 order_id = 5;</code>
- * @param int|string $var
- * @return $this
- */
- public function setOrderId($var)
- {
- GPBUtil::checkUint64($var);
- $this->order_id = $var;
- return $this;
- }
- /**
- * An id of the session which tried to acquire the semaphore
- *
- * Generated from protobuf field <code>uint64 session_id = 1;</code>
- * @return int|string
- */
- public function getSessionId()
- {
- return $this->session_id;
- }
- /**
- * An id of the session which tried to acquire the semaphore
- *
- * Generated from protobuf field <code>uint64 session_id = 1;</code>
- * @param int|string $var
- * @return $this
- */
- public function setSessionId($var)
- {
- GPBUtil::checkUint64($var);
- $this->session_id = $var;
- return $this;
- }
- /**
- * A timeout in milliseconds for operation in waiters queue
- *
- * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
- * @return int|string
- */
- public function getTimeoutMillis()
- {
- return $this->timeout_millis;
- }
- /**
- * A timeout in milliseconds for operation in waiters queue
- *
- * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
- * @param int|string $var
- * @return $this
- */
- public function setTimeoutMillis($var)
- {
- GPBUtil::checkUint64($var);
- $this->timeout_millis = $var;
- return $this;
- }
- /**
- * Number of tokens for an acquire operation
- *
- * Generated from protobuf field <code>uint64 count = 3;</code>
- * @return int|string
- */
- public function getCount()
- {
- return $this->count;
- }
- /**
- * Number of tokens for an acquire operation
- *
- * Generated from protobuf field <code>uint64 count = 3;</code>
- * @param int|string $var
- * @return $this
- */
- public function setCount($var)
- {
- GPBUtil::checkUint64($var);
- $this->count = $var;
- return $this;
- }
- /**
- * User-defined data attached to the acquire operation
- *
- * Generated from protobuf field <code>bytes data = 4;</code>
- * @return string
- */
- public function getData()
- {
- return $this->data;
- }
- /**
- * User-defined data attached to the acquire operation
- *
- * Generated from protobuf field <code>bytes data = 4;</code>
- * @param string $var
- * @return $this
- */
- public function setData($var)
- {
- GPBUtil::checkString($var, False);
- $this->data = $var;
- return $this;
- }
- }
|