Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Bus;
4
 
5
use Closure;
6
 
7
interface BatchRepository
8
{
9
    /**
10
     * Retrieve a list of batches.
11
     *
12
     * @param  int  $limit
13
     * @param  mixed  $before
14
     * @return \Illuminate\Bus\Batch[]
15
     */
16
    public function get($limit, $before);
17
 
18
    /**
19
     * Retrieve information about an existing batch.
20
     *
21
     * @param  string  $batchId
22
     * @return \Illuminate\Bus\Batch|null
23
     */
24
    public function find(string $batchId);
25
 
26
    /**
27
     * Store a new pending batch.
28
     *
29
     * @param  \Illuminate\Bus\PendingBatch  $batch
30
     * @return \Illuminate\Bus\Batch
31
     */
32
    public function store(PendingBatch $batch);
33
 
34
    /**
35
     * Increment the total number of jobs within the batch.
36
     *
37
     * @param  string  $batchId
38
     * @param  int  $amount
39
     * @return void
40
     */
41
    public function incrementTotalJobs(string $batchId, int $amount);
42
 
43
    /**
44
     * Decrement the total number of pending jobs for the batch.
45
     *
46
     * @param  string  $batchId
47
     * @param  string  $jobId
48
     * @return \Illuminate\Bus\UpdatedBatchJobCounts
49
     */
50
    public function decrementPendingJobs(string $batchId, string $jobId);
51
 
52
    /**
53
     * Increment the total number of failed jobs for the batch.
54
     *
55
     * @param  string  $batchId
56
     * @param  string  $jobId
57
     * @return \Illuminate\Bus\UpdatedBatchJobCounts
58
     */
59
    public function incrementFailedJobs(string $batchId, string $jobId);
60
 
61
    /**
62
     * Mark the batch that has the given ID as finished.
63
     *
64
     * @param  string  $batchId
65
     * @return void
66
     */
67
    public function markAsFinished(string $batchId);
68
 
69
    /**
70
     * Cancel the batch that has the given ID.
71
     *
72
     * @param  string  $batchId
73
     * @return void
74
     */
75
    public function cancel(string $batchId);
76
 
77
    /**
78
     * Delete the batch that has the given ID.
79
     *
80
     * @param  string  $batchId
81
     * @return void
82
     */
83
    public function delete(string $batchId);
84
 
85
    /**
86
     * Execute the given Closure within a storage specific transaction.
87
     *
88
     * @param  \Closure  $callback
89
     * @return mixed
90
     */
91
    public function transaction(Closure $callback);
92
}