|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / a / home / dev2.destoffenstraat.com / vendor / magento / framework / Indexer / |
Filename | /home/a/home/dev2.destoffenstraat.com/vendor/magento/framework/Indexer/BatchProviderInterface.php |
Size | 1.45 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 21-Aug-2025 12:26 |
Last modified | 07-Jan-2021 21:08 |
Last accessed | 22-Aug-2025 21:44 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Indexer;
use Magento\Framework\DB\Adapter\AdapterInterface;
use Magento\Framework\DB\Select;
/**
* Generator of consecutive entity ID ranges that must be handled as a batch.
*
* Can be used during indexation process to split large amount of data into batches
* and process them one by one in order to reduce memory consumption and improve overall performance.
*
* @api retrieve Batches when implementing custom Indexer\Action
* @since 101.0.0
*/
interface BatchProviderInterface
{
/**
* Retrieve batches (entity ID ranges) from the given table.
*
* @param AdapterInterface $adapter database adapter.
* @param string $tableName target table name.
* @param string $linkField field that is used as a record identifier.
* @param int $batchSize size of the single range.
* @return \Generator generator that produces entity ID ranges in the format of ['from' => ..., 'to' => ...]
* @since 101.0.0
*/
public function getBatches(AdapterInterface $adapter, $tableName, $linkField, $batchSize);
/**
* Get list of entity ids based on batch
*
* @param AdapterInterface $connection
* @param Select $select
* @param array $batch
* @return array
* @since 101.0.0
*/
public function getBatchIds(AdapterInterface $connection, Select $select, array $batch);
}
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Indexer;
use Magento\Framework\DB\Adapter\AdapterInterface;
use Magento\Framework\DB\Select;
/**
* Generator of consecutive entity ID ranges that must be handled as a batch.
*
* Can be used during indexation process to split large amount of data into batches
* and process them one by one in order to reduce memory consumption and improve overall performance.
*
* @api retrieve Batches when implementing custom Indexer\Action
* @since 101.0.0
*/
interface BatchProviderInterface
{
/**
* Retrieve batches (entity ID ranges) from the given table.
*
* @param AdapterInterface $adapter database adapter.
* @param string $tableName target table name.
* @param string $linkField field that is used as a record identifier.
* @param int $batchSize size of the single range.
* @return \Generator generator that produces entity ID ranges in the format of ['from' => ..., 'to' => ...]
* @since 101.0.0
*/
public function getBatches(AdapterInterface $adapter, $tableName, $linkField, $batchSize);
/**
* Get list of entity ids based on batch
*
* @param AdapterInterface $connection
* @param Select $select
* @param array $batch
* @return array
* @since 101.0.0
*/
public function getBatchIds(AdapterInterface $connection, Select $select, array $batch);
}