コード例 #1
0
 @Override
 public void shutdown() {
   producer.complete();
   try {
     boolean isDone = countDownLatch.await(5, TimeUnit.MINUTES);
     if (!isDone) {
       LOG.warn("Pipeline is still in active state: {} after 5 minutes");
     } else {
       LOG.info("Destroy() on stages is complete");
     }
   } catch (InterruptedException e) {
     LOG.warn("Thread interrupted while waiting on receving the done flag" + e, e);
   }
 }
コード例 #2
0
 @Override
 public boolean inErrorState() {
   return producer.inErrorState() || consumer.inErrorState();
 }
コード例 #3
0
 @Override
 public void destroy() {
   producer.complete();
   super.destroy();
 }
コード例 #4
0
 @Override
 public void put(List<Map.Entry> batch) throws InterruptedException {
   producer.put(new OffsetAndResult<>(recordsProduced, batch));
   recordsProduced += batch.size();
 }