protected Map<URI,ExecutionWindow> waitForActiveWindows() throws InterruptedException {
  Map<URI,ExecutionWindow> windows=Maps.newHashMap();
  while (windows.isEmpty()) {
    lock.lock();
    try {
      if (activeWindows.isEmpty() && enableInfiniteExecutionWindow == false) {
        hasActiveWindows.await();
      }
      windows.putAll(activeWindows);
      if (enableInfiniteExecutionWindow == true) {
        return windows;
      }
    }
  finally {
      lock.unlock();
    }
  }
  return windows;
}

protected Map < URI , ExecutionWindow > waitForActiveWindows ( ) throws InterruptedException { Map < URI , ExecutionWindow > windows = Maps . newHashMap ( ) ; while ( windows . isEmpty ( ) ) { lock . lock ( ) ; try { if ( activeWindows . isEmpty ( ) && enableInfiniteExecutionWindow == false ) { hasActiveWindows . await ( ) ; } windows . putAll ( activeWindows ) ; if ( enableInfiniteExecutionWindow == true ) { return windows ; } } finally { lock . unlock ( ) ; } } return windows ; }
waits for active windows to become available . this will not return until at least one window is active .
