interface JobTypeInterface in Advanced Queue 8
Defines the interface for job types.
Job types contain logic for processing a given job. For example, sending an email or deleting an expired entity.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\advancedqueue\Plugin\AdvancedQueue\JobType\JobTypeInterface
Expanded class hierarchy of JobTypeInterface
All classes that implement JobTypeInterface
1 file declares its use of JobTypeInterface
File
- src/
Plugin/ AdvancedQueue/ JobType/ JobTypeInterface.php, line 14
Namespace
Drupal\advancedqueue\Plugin\AdvancedQueue\JobTypeView source
interface JobTypeInterface extends PluginInspectionInterface {
/**
* Gets the job type label.
*
* @return string
* The job type label.
*/
public function getLabel();
/**
* Gets the maximum number of retries.
*
* When job processing fails, the queue runner will retry the
* job until the maximum number of retries is reached.
* Defaults to 0, indicating that retries are disabled.
*
* @return int
* The job type label.
*/
public function getMaxRetries();
/**
* Gets the retry delay.
*
* Represents the number of seconds that should pass before a retried
* job becomes available again.
*
* @return int
* The retry delay.
*/
public function getRetryDelay();
/**
* Processes the given job.
*
* @param \Drupal\advancedqueue\Job $job
* The job.
*
* @return \Drupal\advancedqueue\JobResult
* The job result.
*/
public function process(Job $job);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JobTypeInterface:: |
public | function | Gets the job type label. | 1 |
JobTypeInterface:: |
public | function | Gets the maximum number of retries. | 1 |
JobTypeInterface:: |
public | function | Gets the retry delay. | 1 |
JobTypeInterface:: |
public | function | Processes the given job. | 4 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |