Shard.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * The class used to present the shard detail, for every shard ,it contains id , status , begin Range, end range, createtime
  4. *
  5. * @author log service dev
  6. */
  7. class Aliyun_Log_Models_Shard{
  8. /**
  9. * @var interger the shard id
  10. */
  11. private $shardId;
  12. /**
  13. * @var string shard status (readwrite or readonly)
  14. */
  15. private $status;
  16. /**
  17. * @var string shard inclusive begin key
  18. */
  19. private $inclusiveBeginKey;
  20. /**
  21. * @var string shard exclusive begin key
  22. */
  23. private $exclusiveEndKey;
  24. /**
  25. * @var integer shard create time
  26. */
  27. private $createTime;
  28. /**
  29. * Aliyun_Log_Models_Shhard constructor
  30. *
  31. * @param integer $shardId
  32. * the shard id
  33. * @param string $status
  34. * the shard status
  35. * @param string $inclusiveBeginKey
  36. * the shard inclusive begin key
  37. * @param string $exclusiveEndKey
  38. * the shard exclusive end key
  39. * @para integer @createTime
  40. * the shard create time
  41. */
  42. public function __construct($shardId,$status,$inclusiveBeginKey,$exclusiveEndKey,$createTime) {
  43. $this->shardId=$shardId;
  44. $this->status = $status;
  45. $this->inclusiveBeginKey = $inclusiveBeginKey;
  46. $this->exclusiveEndKey = $exclusiveEndKey;
  47. $this->createTime = $createTime;
  48. }
  49. /**
  50. * Get the shardId
  51. *
  52. * @return integer the shard id
  53. */
  54. public function getShardId(){
  55. return $this -> shardId;
  56. }
  57. /**
  58. * Get the shard status
  59. *
  60. * @return string the shard status
  61. */
  62. public function getStatus(){
  63. return $this -> status;
  64. }
  65. /**
  66. * Get the shard inclusive begin key
  67. *
  68. * @return string inclusive begin key
  69. */
  70. public function getInclusiveBeginKey(){
  71. return $this -> inclusiveBeginKey;
  72. }
  73. /**
  74. * Get the shard exclusive begin key
  75. *
  76. * @return string exclusive begin key
  77. */
  78. public function getExclusiveBeginKey(){
  79. return $this -> exclusiveBeginKey;
  80. }
  81. /**
  82. * Get the shard create time
  83. *
  84. * @return integer createTime
  85. */
  86. public function getCreateTime(){
  87. return $this -> createTime;
  88. }
  89. }