Called once we have obtained all the results of this group.
()
| 161 | |
| 162 | /** Called once we have obtained all the results of this group. */ |
| 163 | private void done() { |
| 164 | // From this point on, we no longer need to synchronize in order to |
| 165 | // access `results' since we know we're done, so no other thread is |
| 166 | // going to call recordCompletion() again. |
| 167 | for (final Object r : results) { |
| 168 | if (r instanceof Exception) { |
| 169 | parent.callback(new DeferredGroupException(results, (Exception) r)); |
| 170 | return; |
| 171 | } |
| 172 | } |
| 173 | parent.callback(results); |
| 174 | } |
| 175 | |
| 176 | public String toString() { |
| 177 | return "DeferredGroup" |
no test coverage detected