[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/jobqueue/ -> JobSpecification.php (summary)

Job queue task description base code. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 189 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

IJobSpecification:: (6 methods):
  getType()
  getParams()
  getReleaseTimestamp()
  ignoreDuplicates()
  getDeduplicationInfo()
  getTitle()

JobSpecification:: (8 methods):
  __construct()
  validateParams()
  getType()
  getTitle()
  getParams()
  getReleaseTimestamp()
  ignoreDuplicates()
  getDeduplicationInfo()


Interface: IJobSpecification  - X-Ref

Job queue task description interface

getType()   X-Ref

return: string Job type

getParams()   X-Ref

return: array

getReleaseTimestamp()   X-Ref

return: int|null UNIX timestamp to delay running this job until, otherwise null

ignoreDuplicates()   X-Ref

return: bool Whether only one of each identical set of jobs should be run

getDeduplicationInfo()   X-Ref
Subclasses may need to override this to make duplication detection work.
The resulting map conveys everything that makes the job unique. This is
only checked if ignoreDuplicates() returns true, meaning that duplicate
jobs are supposed to be ignored.

return: array Map of key/values

getTitle()   X-Ref

return: Title Descriptive title (this can simply be informative)

Class: JobSpecification  - X-Ref

Job queue task description base code

Example usage:
<code>
$job = new JobSpecification(
'null',
array( 'lives' => 1, 'usleep' => 100, 'pi' => 3.141569 ),
array( 'removeDuplicates' => 1 ),
Title::makeTitle( NS_SPECIAL, 'nullity' )
);
JobQueueGroup::singleton()->push( $job )
</code>

__construct($type, array $params, array $opts = array()   X-Ref

param: string $type
param: array $params Map of key/values
param: array $opts Map of key/values
param: Title $title Optional descriptive title

validateParams( array $params )   X-Ref

param: array $params

getType()   X-Ref

return: string

getTitle()   X-Ref

return: Title

getParams()   X-Ref

return: array

getReleaseTimestamp()   X-Ref

return: int|null UNIX timestamp to delay running this job until, otherwise null

ignoreDuplicates()   X-Ref

return: bool Whether only one of each identical set of jobs should be run

getDeduplicationInfo()   X-Ref
Subclasses may need to override this to make duplication detection work.
The resulting map conveys everything that makes the job unique. This is
only checked if ignoreDuplicates() returns true, meaning that duplicate
jobs are supposed to be ignored.

return: array Map of key/values



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1