Version 1
[yaffs-website] / vendor / drush / drush / lib / Drush / Queue / QueueInterface.php
diff --git a/vendor/drush/drush/lib/Drush/Queue/QueueInterface.php b/vendor/drush/drush/lib/Drush/Queue/QueueInterface.php
new file mode 100644 (file)
index 0000000..5d8adba
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+
+namespace Drush\Queue;
+
+/**
+ * Defines an interface for interacting with queues.
+ */
+interface QueueInterface {
+
+  /**
+   * Returns all queues.
+   */
+  public function getQueues();
+
+  /**
+   * Runs a given queue.
+   *
+   * @param string $name
+   *   The name of the queue to run.
+   * @param int $time_limit
+   *   The maximum number of seconds that the queue can run. By default the
+   *   queue will be run as long as possible.
+   *
+   * @return int
+   *   The number of items successfully processed from the queue.
+   */
+  public function run($name, $time_limit = 0);
+
+  /**
+   * Returns a given queue definition.
+   *
+   * @param string $name
+   *   The name of the queue to run.
+   */
+  public function getQueue($name);
+
+  /**
+   * Returns a given queue definition.
+   *
+   * @param string $name
+   *   The name of the queue to run.
+   */
+  public function getInfo($name);
+
+}