3 * Job queue task description base code.
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.
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.
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
24 * Job queue task description interface
29 interface IJobSpecification
{
31 * @return string Job type
33 public function getType();
38 public function getParams();
41 * @return int|null UNIX timestamp to delay running this job until, otherwise null
43 public function getReleaseTimestamp();
46 * @return bool Whether only one of each identical set of jobs should be run
48 public function ignoreDuplicates();
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.
56 * @return array Map of key/values
58 public function getDeduplicationInfo();
61 * @see JobQueue::deduplicateRootJob()
65 public function getRootJobParams();
68 * @see JobQueue::deduplicateRootJob()
72 public function hasRootJobParams();
75 * @see JobQueue::deduplicateRootJob()
76 * @return bool Whether this is job is a root job
78 public function isRootJob();
81 * @return Title Descriptive title (this can simply be informative)
83 public function getTitle();