org.linkedin.util-core/src/main/java/org/linkedin/util/lifecycle/Shutdown.java
@Override
  public void waitForShutdown(Object timeout)
    throws InterruptedException, IllegalStateException, TimeoutException
  {
    if(!_shutdown) throw new IllegalStateException("call shutdown first");
    pendingCallsCount.waitForCounter(timeout);
  }
@Override
  public void waitForShutdown(Object timeout)
    throws InterruptedException, IllegalStateException, TimeoutException
  {
    if(!_shutdown) throw new IllegalStateException("call shutdown first");
    pendingCallsCount.waitForCounter(timeout);
  }
Waits for shutdown to be completed. After calling shutdown, there may still be some pending work
that needs to be accomplised. This method will block until it is done but no longer than the
timeout.

@param timeout how long to wait maximum for the shutdown
@throws InterruptedException  if interrupted while waiting
@throws IllegalStateException if shutdown has not been called
@throws TimeoutException      if shutdown still not complete after timeout