17 private $operationCache = [];
34 private $statusMap = [
52 $this->bulkStatus = $bulkStatus;
53 $this->bulkUuid = $bulkUuid;
65 'operations_total' => 0,
66 'operations_successful' => 0,
67 'operations_failed' => 0,
68 'failed_retriable' => 0,
69 'failed_not_retriable' => 0,
73 if (array_key_exists($bulkUuid, $this->operationCache)) {
74 return $this->operationCache[$bulkUuid];
77 foreach ($this->statusMap as $statusCode => $readableKey) {
78 $details[$readableKey] = $this->bulkStatus->getOperationsCountByBulkIdAndStatus(
86 $this->operationCache[$bulkUuid] =
$details;
98 return $this->operationCache[$this->bulkUuid][
'operations_total'];
109 return $this->operationCache[$this->bulkUuid][$statusKey];
120 return $this->operationCache[$this->bulkUuid][$statusKey];
130 return $this->operationCache[$this->bulkUuid][
'operations_failed'];
140 return $this->operationCache[$this->bulkUuid][$statusKey];
151 return $this->operationCache[$this->bulkUuid][$statusKey];
162 return $this->operationCache[$this->bulkUuid][$statusKey];
__construct(BulkStatusInterface $bulkStatus, $bulkUuid=null)
const STATUS_TYPE_REJECTED
const STATUS_TYPE_NOT_RETRIABLY_FAILED
const STATUS_TYPE_RETRIABLY_FAILED
const STATUS_TYPE_COMPLETE
getOperationsSuccessful()