17 private $batchRowsCount;
27 private $batchSizeAdjusters;
35 public function __construct(array $batchRowsCount, array $estimators, array $batchSizeAdjusters)
37 $this->batchRowsCount = $batchRowsCount;
38 $this->estimators = $estimators;
39 $this->batchSizeAdjusters = $batchSizeAdjusters;
53 $batchRowsCount = isset($this->batchRowsCount[$indexerTypeId])
54 ? $this->batchRowsCount[$indexerTypeId]
55 : $this->batchRowsCount[
'default'];
58 $calculator = isset($this->estimators[$indexerTypeId])
59 ? $this->estimators[$indexerTypeId]
60 : $this->estimators[
'default'];
62 $batchRowsCount = isset($this->batchSizeAdjusters[$indexerTypeId])
63 ? $this->batchSizeAdjusters[$indexerTypeId]->adjust($batchRowsCount)
66 $calculator->ensureBatchSize(
$connection, $batchRowsCount);
68 return $batchRowsCount;
__construct(array $batchRowsCount, array $estimators, array $batchSizeAdjusters)