class CancellableCountDownLatch extends CountDownLatch {

    @Override
    public void await() throws InterruptedException {
        super.await();
        if (isCancelled) {
            throw Optional.ofNullable(exception).orElse(new CountDownLatchCancelledException());
        }
    }

    public  CancellableCountDownLatch(int count);

}