Additional phpdoc
This commit is contained in:
parent
3aafa837b8
commit
62288971ca
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
|
||||
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
|
@ -8,7 +8,9 @@
|
|||
|
||||
namespace OC\BackgroundJob;
|
||||
|
||||
class JobList {
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
|
||||
class JobList implements IJobList {
|
||||
/**
|
||||
* @var \OCP\IDBConnection
|
||||
*/
|
||||
|
|
|
@ -10,14 +10,33 @@ namespace OCP\BackgroundJob;
|
|||
|
||||
interface IJob {
|
||||
/**
|
||||
* @param \OCP\BackgroundJob\IJobList $jobList
|
||||
* Run the background job with the registered argument
|
||||
*
|
||||
* @param \OCP\BackgroundJob\IJobList $jobList The job list that manages the state of this job
|
||||
* @param \OC\Log $logger
|
||||
*/
|
||||
public function execute($jobList, $logger = null);
|
||||
|
||||
/**
|
||||
* Get the id of the background job
|
||||
* This id is determined by the job list when a job is added to the list
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId();
|
||||
|
||||
/**
|
||||
* Get the last time this job was run as unix timestamp
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getLastRun();
|
||||
|
||||
/**
|
||||
* Get the argument associated with the background job
|
||||
* This is the argument that will be passed to the background job
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getArgument();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
|
||||
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
|
@ -10,12 +10,16 @@ namespace OCP\BackgroundJob;
|
|||
|
||||
interface IJobList {
|
||||
/**
|
||||
* Add a job to the list
|
||||
*
|
||||
* @param \OCP\BackgroundJob\IJob |string $job
|
||||
* @param mixed $argument
|
||||
* @param mixed $argument The argument to be passed to $job->run() when the job is exectured
|
||||
*/
|
||||
public function add($job, $argument = null);
|
||||
|
||||
/**
|
||||
* Remove a job from the list
|
||||
*
|
||||
* @param \OCP\BackgroundJob\IJob|string $job
|
||||
* @param mixed $argument
|
||||
*/
|
||||
|
@ -51,7 +55,7 @@ interface IJobList {
|
|||
public function getById($id);
|
||||
|
||||
/**
|
||||
* set the job that was last ran
|
||||
* set the job that was last ran to the current time
|
||||
*
|
||||
* @param \OCP\BackgroundJob\IJob $job
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue