PHP Class UrbanIndo\Yii2\Queue\Queues\MultipleQueue

Since: 2015.02.25
Author: Petra Barus ([email protected])
Inheritance: extends UrbanIndo\Yii2\Queue\Queue
Afficher le fichier Open project: urbanindo/yii2-queue

Méthodes publiques

Свойство Type Description
$queues UrbanIndo\Yii2\Queue\Queue[] Stores the queue.
$strategy UrbanIndo\Yii2\Queue\Strategies\Strategy The job fetching strategy.

Méthodes publiques

Méthode Description
getQueue ( integer $index ) : Queue | null
getSize ( ) : integer Returns the total number of all queue size.
init ( ) : void Initialize the queue.
postToQueue ( UrbanIndo\Yii2\Queue\Job &$job, integer $index ) : boolean Post new job to a specific queue.
purge ( ) : boolean Purge the whole queue.

Méthodes protégées

Méthode Description
deleteJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean Delete the job.
fetchJob ( ) : UrbanIndo\Yii2\Queue\Job | boolean Return next job from the queue.
postJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean Post new job to the queue.
releaseJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean Release the job.

Method Details

deleteJob() protected méthode

Delete the job.
protected deleteJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean
$job UrbanIndo\Yii2\Queue\Job The job.
Résultat boolean Whether the operation succeed.

fetchJob() protected méthode

Return next job from the queue.
protected fetchJob ( ) : UrbanIndo\Yii2\Queue\Job | boolean
Résultat UrbanIndo\Yii2\Queue\Job | boolean The job fetched or false if not found.

getQueue() public méthode

public getQueue ( integer $index ) : Queue | null
$index integer The index of the queue.
Résultat UrbanIndo\Yii2\Queue\Queue | null the queue or null if not exists.

getSize() public méthode

Returns the total number of all queue size.
public getSize ( ) : integer
Résultat integer

init() public méthode

Initialize the queue.
public init ( ) : void
Résultat void

postJob() protected méthode

Post new job to the queue.
protected postJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean
$job UrbanIndo\Yii2\Queue\Job The job.
Résultat boolean Whether operation succeed.

postToQueue() public méthode

Post new job to a specific queue.
public postToQueue ( UrbanIndo\Yii2\Queue\Job &$job, integer $index ) : boolean
$job UrbanIndo\Yii2\Queue\Job The job.
$index integer The queue index.
Résultat boolean Whether operation succeed.

purge() public méthode

Purge the whole queue.
public purge ( ) : boolean
Résultat boolean

releaseJob() protected méthode

Release the job.
protected releaseJob ( UrbanIndo\Yii2\Queue\Job $job ) : boolean
$job UrbanIndo\Yii2\Queue\Job The job to release.
Résultat boolean whether the operation succeed.

Property Details

$queues public_oe property

Stores the queue.
public Queue[],UrbanIndo\Yii2\Queue $queues
Résultat UrbanIndo\Yii2\Queue\Queue[]

$strategy public_oe property

The job fetching strategy.
public Strategy,UrbanIndo\Yii2\Queue\Strategies $strategy
Résultat UrbanIndo\Yii2\Queue\Strategies\Strategy