コード例 #1
0
 @Override
 public void upstreamFailed(Throwable throwable) {
   upstreamFailure.set(throwable);
   if (remainingUpstreams.decrementAndGet() > 0) {
     return;
   }
   if (downstream != null) {
     downstream.upstreamFailed(throwable);
   }
 }
コード例 #2
0
 @Override
 public void upstreamFinished() {
   if (remainingUpstreams.decrementAndGet() > 0) {
     return;
   }
   for (int i = 0; i < aggregationCollectors.length; i++) {
     row[i] = aggregationCollectors[i].finishCollect();
   }
   if (downstream != null) {
     downstream.setNextRow(row);
     Throwable throwable = upstreamFailure.get();
     if (throwable != null) {
       downstream.upstreamFailed(throwable);
     } else {
       downstream.upstreamFinished();
     }
   }
 }