Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
Model
ResourceModel
Product
Indexer
Eav
BatchSizeCalculator.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav
;
8
9
use
Magento\Framework\DB\Adapter\AdapterInterface
;
10
use
Magento\Framework\Exception\NoSuchEntityException
;
11
17
class
BatchSizeCalculator
18
{
22
private
$batchSizes;
23
27
private
$batchSizeManagers;
28
33
public
function
__construct
(
34
array $batchSizes,
35
array $batchSizeManagers
36
) {
37
$this->batchSizes = $batchSizes;
38
$this->batchSizeManagers = $batchSizeManagers;
39
}
40
49
public
function
estimateBatchSize
(
50
AdapterInterface
$connection
,
51
$indexerTypeId
52
) {
53
if
(!isset($this->batchSizes[$indexerTypeId])) {
54
throw
NoSuchEntityException::singleField
(
'indexTypeId'
, $indexerTypeId);
55
}
56
$this->batchSizeManagers[$indexerTypeId]->ensureBatchSize(
$connection
, $this->batchSizes[$indexerTypeId]);
57
58
return
$this->batchSizes[$indexerTypeId];
59
}
60
}
Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav\BatchSizeCalculator\__construct
__construct(array $batchSizes, array $batchSizeManagers)
Definition:
BatchSizeCalculator.php:33
Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav
Definition:
SourceTest.php:6
Magento\Framework\Exception\NoSuchEntityException\singleField
static singleField($fieldName, $fieldValue)
Definition:
NoSuchEntityException.php:48
Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav\BatchSizeCalculator
Definition:
BatchSizeCalculator.php:17
Magento\Framework\DB\Adapter\AdapterInterface
Definition:
AdapterInterface.php:16
Magento\Catalog\Model\ResourceModel\Product\Indexer\Eav\BatchSizeCalculator\estimateBatchSize
estimateBatchSize(AdapterInterface $connection, $indexerTypeId)
Definition:
BatchSizeCalculator.php:49
$connection
$connection
Definition:
bulk.php:13
Magento\Framework\Exception\NoSuchEntityException
Definition:
NoSuchEntityException.php:16