public void waitForCompletion() throws InterruptedException {
        try {
            waitForCompletion(0L);
        } catch (AsyncTimeoutException ate) {
            // cannot happen since arg of 0L means wait forever
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Unexpected timeout on blocking wait call, exception: " + ate.getMessage());
            }
            FFDCFilter.processException(ate,
                                        getClass().getName() + ".waitForCompletion", "268", this);
            InterruptedException ie = new InterruptedException("Unexpected timeout");
            ie.initCause(ate);
            throw ie;
        }
    }
public void waitForCompletion ( ) throws InterruptedException { try { waitForCompletion ( 0L ) ; } catch ( AsyncTimeoutException ate ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Unexpected timeout on blocking wait call, exception: " + ate . getMessage ( ) ) ; } FFDCFilter . processException ( ate , getClass ( ) . getName ( ) + ".waitForCompletion" , "268" , this ) ; InterruptedException ie = new InterruptedException ( "Unexpected timeout" ) ; ie . initCause ( ate ) ; throw ie ; } }
Blocks the calling thread indefinitely until the AsyncFuture has
completed. If the AsyncFuture has already compeleted, the method
returns immediately.

@throws InterruptedException
if the waiting thread is interrupted before
the wait completes.