summaryrefslogtreecommitdiffstats
path: root/lib/public/backgroundjob
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
commit7644950b48b094bfe5675348aefb7cf5747d325b (patch)
treea1792e21239a86f471da99b454134a5d8533ef77 /lib/public/backgroundjob
parent8653da6c16597959c7bd0f0b202747ff96204575 (diff)
downloadnextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.tar.gz
nextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.zip
Add @since tags to all methods in public namespace
* enhance the app development experience - you can look up the method introduction right inside the code without searching via git blame * easier to write apps for multiple versions
Diffstat (limited to 'lib/public/backgroundjob')
-rw-r--r--lib/public/backgroundjob/ijob.php10
-rw-r--r--lib/public/backgroundjob/ijoblist.php15
2 files changed, 25 insertions, 0 deletions
diff --git a/lib/public/backgroundjob/ijob.php b/lib/public/backgroundjob/ijob.php
index 9206590dd05..3a1be86ef4e 100644
--- a/lib/public/backgroundjob/ijob.php
+++ b/lib/public/backgroundjob/ijob.php
@@ -23,6 +23,12 @@
namespace OCP\BackgroundJob;
+/**
+ * Interface IJob
+ *
+ * @package OCP\BackgroundJob
+ * @since 7.0.0
+ */
interface IJob {
/**
* Run the background job with the registered argument
@@ -30,6 +36,7 @@ interface IJob {
* @param \OCP\BackgroundJob\IJobList $jobList The job list that manages the state of this job
* @param \OC\Log $logger
* @return void
+ * @since 7.0.0
*/
public function execute($jobList, $logger = null);
@@ -38,6 +45,7 @@ interface IJob {
* This id is determined by the job list when a job is added to the list
*
* @return int
+ * @since 7.0.0
*/
public function getId();
@@ -45,6 +53,7 @@ interface IJob {
* Get the last time this job was run as unix timestamp
*
* @return int
+ * @since 7.0.0
*/
public function getLastRun();
@@ -53,6 +62,7 @@ interface IJob {
* This is the argument that will be passed to the background job
*
* @return mixed
+ * @since 7.0.0
*/
public function getArgument();
}
diff --git a/lib/public/backgroundjob/ijoblist.php b/lib/public/backgroundjob/ijoblist.php
index 2f551265976..e2dc348e54d 100644
--- a/lib/public/backgroundjob/ijoblist.php
+++ b/lib/public/backgroundjob/ijoblist.php
@@ -24,6 +24,12 @@
namespace OCP\BackgroundJob;
+/**
+ * Interface IJobList
+ *
+ * @package OCP\BackgroundJob
+ * @since 7.0.0
+ */
interface IJobList {
/**
* Add a job to the list
@@ -32,6 +38,7 @@ interface IJobList {
* @param mixed $argument The argument to be passed to $job->run() when the job is exectured
* @param string $job
* @return void
+ * @since 7.0.0
*/
public function add($job, $argument = null);
@@ -41,6 +48,7 @@ interface IJobList {
* @param \OCP\BackgroundJob\IJob|string $job
* @param mixed $argument
* @return void
+ * @since 7.0.0
*/
public function remove($job, $argument = null);
@@ -50,6 +58,7 @@ interface IJobList {
* @param \OCP\BackgroundJob\IJob|string $job
* @param mixed $argument
* @return bool
+ * @since 7.0.0
*/
public function has($job, $argument);
@@ -57,6 +66,7 @@ interface IJobList {
* get all jobs in the list
*
* @return \OCP\BackgroundJob\IJob[]
+ * @since 7.0.0
*/
public function getAll();
@@ -64,12 +74,14 @@ interface IJobList {
* get the next job in the list
*
* @return \OCP\BackgroundJob\IJob
+ * @since 7.0.0
*/
public function getNext();
/**
* @param int $id
* @return \OCP\BackgroundJob\IJob
+ * @since 7.0.0
*/
public function getById($id);
@@ -78,6 +90,7 @@ interface IJobList {
*
* @param \OCP\BackgroundJob\IJob $job
* @return void
+ * @since 7.0.0
*/
public function setLastJob($job);
@@ -85,6 +98,7 @@ interface IJobList {
* get the id of the last ran job
*
* @return int
+ * @since 7.0.0
*/
public function getLastJob();
@@ -93,6 +107,7 @@ interface IJobList {
*
* @param \OCP\BackgroundJob\IJob $job
* @return void
+ * @since 7.0.0
*/
public function setLastRun($job);
}