IndexerInterface.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Indexer;
  7. /**
  8. * Indexer
  9. *
  10. * @api
  11. * @deprecated 102.0.0 Facade will be split
  12. * @see \Magento\Framework\Indexer\ActionInterface
  13. * @since 100.0.2
  14. */
  15. interface IndexerInterface
  16. {
  17. /**
  18. * Return indexer ID
  19. *
  20. * @return string
  21. */
  22. public function getId();
  23. /**
  24. * Return indexer's view ID
  25. *
  26. * @return string
  27. */
  28. public function getViewId();
  29. /**
  30. * Return indexer action class
  31. *
  32. * @return string
  33. */
  34. public function getActionClass();
  35. /**
  36. * Return indexer title
  37. *
  38. * @return string
  39. */
  40. public function getTitle();
  41. /**
  42. * Return indexer description
  43. *
  44. * @return string
  45. */
  46. public function getDescription();
  47. /**
  48. * Return indexer fields
  49. *
  50. * @return array
  51. */
  52. public function getFields();
  53. /**
  54. * Return indexer sources
  55. *
  56. * @return array
  57. */
  58. public function getSources();
  59. /**
  60. * Return indexer handlers
  61. *
  62. * @return array
  63. */
  64. public function getHandlers();
  65. /**
  66. * Fill indexer data from config
  67. *
  68. * @param string $indexerId
  69. * @return IndexerInterface
  70. * @throws \InvalidArgumentException
  71. */
  72. public function load($indexerId);
  73. /**
  74. * Return related view object
  75. *
  76. * @return \Magento\Framework\Mview\ViewInterface
  77. */
  78. public function getView();
  79. /**
  80. * Return related state object
  81. *
  82. * @return StateInterface
  83. */
  84. public function getState();
  85. /**
  86. * Set indexer state object
  87. *
  88. * @param StateInterface $state
  89. * @return IndexerInterface
  90. */
  91. public function setState(StateInterface $state);
  92. /**
  93. * Check whether indexer is run by schedule
  94. *
  95. * @return bool
  96. */
  97. public function isScheduled();
  98. /**
  99. * Turn scheduled mode on/off
  100. *
  101. * @param bool $scheduled
  102. * @return void
  103. */
  104. public function setScheduled($scheduled);
  105. /**
  106. * Check whether indexer is valid
  107. *
  108. * @return bool
  109. */
  110. public function isValid();
  111. /**
  112. * Check whether indexer is invalid
  113. *
  114. * @return bool
  115. */
  116. public function isInvalid();
  117. /**
  118. * Check whether indexer is working
  119. *
  120. * @return bool
  121. */
  122. public function isWorking();
  123. /**
  124. * Set indexer invalid
  125. *
  126. * @return void
  127. */
  128. public function invalidate();
  129. /**
  130. * Return indexer status
  131. *
  132. * @return string
  133. */
  134. public function getStatus();
  135. /**
  136. * Return indexer or mview latest updated time
  137. *
  138. * @return string
  139. */
  140. public function getLatestUpdated();
  141. /**
  142. * Regenerate full index
  143. *
  144. * @return void
  145. * @throws \Exception
  146. * @deprecated 102.0.0
  147. * @see \Magento\Framework\Indexer\ActionInterface::executeFull
  148. */
  149. public function reindexAll();
  150. /**
  151. * Regenerate one row in index by ID
  152. *
  153. * @param int $id
  154. * @return void
  155. * @deprecated 102.0.0
  156. * @see \Magento\Framework\Indexer\ActionInterface::executeList
  157. */
  158. public function reindexRow($id);
  159. /**
  160. * Regenerate rows in index by ID list
  161. *
  162. * @param int[] $ids
  163. * @return void
  164. * @deprecated 102.0.0
  165. * @see \Magento\Framework\Indexer\ActionInterface::executeList
  166. */
  167. public function reindexList($ids);
  168. }