You are here

interface RadioactivityProcessorInterface in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x src/RadioactivityProcessorInterface.php \Drupal\radioactivity\RadioactivityProcessorInterface

Interface RadioactivityProcessorInterface.

@package Drupal\radioactivity

Hierarchy

Expanded class hierarchy of RadioactivityProcessorInterface

All classes that implement RadioactivityProcessorInterface

2 files declare their use of RadioactivityProcessorInterface
RadioactivityProcessorTest.php in tests/src/Unit/RadioactivityProcessorTest.php
RadioactivityQueueWorkerBase.php in src/Plugin/QueueWorker/RadioactivityQueueWorkerBase.php

File

src/RadioactivityProcessorInterface.php, line 12

Namespace

Drupal\radioactivity
View source
interface RadioactivityProcessorInterface {

  /**
   * The number of entities to be processed in one queue job.
   */
  const QUEUE_CHUNK_SIZE = 10;

  /**
   * The state key to store the last processed timestamp.
   */
  const LAST_PROCESSED_STATE_KEY = 'radioactivity_last_processed_timestamp';

  /**
   * The ID of the decay queue worker.
   */
  const QUEUE_WORKER_DECAY = 'radioactivity_decay';

  /**
   * The ID of the incidents queue worker.
   */
  const QUEUE_WORKER_INCIDENTS = 'radioactivity_incidents';

  /**
   * The logger channel ID.
   */
  const LOGGER_CHANNEL = 'radioactivity';

  /**
   * Apply decay to entities.
   *
   * @return int
   *   The number of decays processed.
   */
  public function processDecay();

  /**
   * Queue processing of Radioactivity decays.
   *
   * @param \Drupal\field\FieldStorageConfigInterface $fieldConfig
   *   Configuration of the field to be processed.
   * @param array $entityIds
   *   Entity IDs to be processed.
   */
  public function queueProcessDecay(FieldStorageConfigInterface $fieldConfig, array $entityIds);

  /**
   * Process emits from the queue.
   *
   * @return int
   *   The number of emits processed.
   */
  public function processIncidents();

  /**
   * Queue processing of Radioactivity emission incidents.
   *
   * @param string $entityType
   *   Incident entity type.
   * @param \Drupal\radioactivity\IncidentInterface[][] $entityIncidents
   *   Radioactivity incidents grouped per entity ID (1st) and incident ID
   *   (2nd).
   */
  public function queueProcessIncidents($entityType, array $entityIncidents);

}

Members

Namesort descending Modifiers Type Description Overrides
RadioactivityProcessorInterface::LAST_PROCESSED_STATE_KEY constant The state key to store the last processed timestamp.
RadioactivityProcessorInterface::LOGGER_CHANNEL constant The logger channel ID.
RadioactivityProcessorInterface::processDecay public function Apply decay to entities. 1
RadioactivityProcessorInterface::processIncidents public function Process emits from the queue. 1
RadioactivityProcessorInterface::queueProcessDecay public function Queue processing of Radioactivity decays. 1
RadioactivityProcessorInterface::queueProcessIncidents public function Queue processing of Radioactivity emission incidents. 1
RadioactivityProcessorInterface::QUEUE_CHUNK_SIZE constant The number of entities to be processed in one queue job.
RadioactivityProcessorInterface::QUEUE_WORKER_DECAY constant The ID of the decay queue worker.
RadioactivityProcessorInterface::QUEUE_WORKER_INCIDENTS constant The ID of the incidents queue worker.