Fix order of @var parameter in PHP
[lhc/web/wiklou.git] / includes / jobqueue / IJobSpecification.php
1 <?php
2 /**
3 * Job queue task description base code.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
19 *
20 * @file
21 */
22
23 /**
24 * Job queue task description interface
25 *
26 * @ingroup JobQueue
27 * @since 1.23
28 */
29 interface IJobSpecification {
30 /**
31 * @return string Job type
32 */
33 public function getType();
34
35 /**
36 * @return array
37 */
38 public function getParams();
39
40 /**
41 * @return int|null UNIX timestamp to delay running this job until, otherwise null
42 */
43 public function getReleaseTimestamp();
44
45 /**
46 * @return bool Whether only one of each identical set of jobs should be run
47 */
48 public function ignoreDuplicates();
49
50 /**
51 * Subclasses may need to override this to make duplication detection work.
52 * The resulting map conveys everything that makes the job unique. This is
53 * only checked if ignoreDuplicates() returns true, meaning that duplicate
54 * jobs are supposed to be ignored.
55 *
56 * @return array Map of key/values
57 */
58 public function getDeduplicationInfo();
59
60 /**
61 * @see JobQueue::deduplicateRootJob()
62 * @return array
63 * @since 1.26
64 */
65 public function getRootJobParams();
66
67 /**
68 * @see JobQueue::deduplicateRootJob()
69 * @return bool
70 * @since 1.22
71 */
72 public function hasRootJobParams();
73
74 /**
75 * @see JobQueue::deduplicateRootJob()
76 * @return bool Whether this is job is a root job
77 */
78 public function isRootJob();
79
80 /**
81 * @return Title Descriptive title (this can simply be informative)
82 */
83 public function getTitle();
84 }