PHP Class UrbanIndo\Yii2\Queue\Queues\MultipleQueue

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

Public Properties

Property Type Description
$queues UrbanIndo\Yii2\Queue\Queue[] Stores the queue.
$strategy UrbanIndo\Yii2\Queue\Strategies\Strategy The job fetching strategy.

Public Methods

Method 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.

Protected Methods

Method 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 method

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

fetchJob() protected method

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

getQueue() public method

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

getSize() public method

Returns the total number of all queue size.
public getSize ( ) : integer
return integer

init() public method

Initialize the queue.
public init ( ) : void
return void

postJob() protected method

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

postToQueue() public method

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.
return boolean Whether operation succeed.

purge() public method

Purge the whole queue.
public purge ( ) : boolean
return boolean

releaseJob() protected method

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

Property Details

$queues public_oe property

Stores the queue.
public Queue[],UrbanIndo\Yii2\Queue $queues
return UrbanIndo\Yii2\Queue\Queue[]

$strategy public_oe property

The job fetching strategy.
public Strategy,UrbanIndo\Yii2\Queue\Strategies $strategy
return UrbanIndo\Yii2\Queue\Strategies\Strategy