IndexerTableSwapperInterface.php 780 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\CatalogRule\Model\Indexer;
  8. /**
  9. * Manage additional tables used while building new index to preserve
  10. * index tables until the process finishes.
  11. */
  12. interface IndexerTableSwapperInterface
  13. {
  14. /**
  15. * Get working table name used to build index.
  16. *
  17. * @param string $originalTable
  18. *
  19. * @return string
  20. */
  21. public function getWorkingTableName(string $originalTable): string;
  22. /**
  23. * Swap working tables with actual tables to save new indexes.
  24. *
  25. * @param string[] $originalTablesNames
  26. *
  27. * @return void
  28. */
  29. public function swapIndexTables(array $originalTablesNames);
  30. }