1 | <?php |
||
19 | class Result |
||
20 | { |
||
21 | /** @var int */ |
||
22 | private $readCount = 0; |
||
23 | |||
24 | /** @var int */ |
||
25 | private $writeCount = 0; |
||
26 | |||
27 | /** @var int */ |
||
28 | private $itemWriteCount = 0; |
||
29 | |||
30 | /** @var \Exception[] */ |
||
31 | private $exceptions = []; |
||
32 | |||
33 | /** |
||
34 | * @return Result |
||
35 | */ |
||
36 | 1 | public function incReadCount() |
|
42 | |||
43 | /** |
||
44 | * @return int |
||
45 | */ |
||
46 | 1 | public function getReadCount() |
|
50 | |||
51 | /** |
||
52 | * @return Result |
||
53 | */ |
||
54 | 1 | public function incWriteCount() |
|
60 | |||
61 | /** |
||
62 | * Returns the write count of the result. This counter is incremented every time an item is written to a writer. If |
||
63 | * an item is written to multiple writers, the counter is increased multiple times for every item. For example, when |
||
64 | * 3 items are written to 2 writers each then the write count will be 6. |
||
65 | * |
||
66 | * @return int |
||
67 | */ |
||
68 | 1 | public function getWriteCount() |
|
72 | |||
73 | /** |
||
74 | * @return Result |
||
75 | */ |
||
76 | 1 | public function incItemWriteCount() |
|
82 | |||
83 | /** |
||
84 | * Returns the item write count of the result. This counter is incremented every time an item is written. Every |
||
85 | * item can only increase this counter by 1. For example, when 3 items are written to 2 writers each then the |
||
86 | * item write count will be 3. |
||
87 | * |
||
88 | * @return int |
||
89 | */ |
||
90 | 1 | public function getItemWriteCount() |
|
94 | |||
95 | /** |
||
96 | * @param \Exception $exception |
||
97 | * |
||
98 | * @return Result |
||
99 | */ |
||
100 | 1 | public function addException(\Exception $exception) |
|
106 | |||
107 | /** |
||
108 | * @return int |
||
109 | */ |
||
110 | 1 | public function getErrorCount() |
|
114 | |||
115 | /** |
||
116 | * @return \Exception[] |
||
117 | */ |
||
118 | 1 | public function getExceptions() |
|
122 | } |
||
123 |