@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); } }
@Override public void destroy() { producer.complete(); super.destroy(); }