public void waitForSessionBound ( ) throws InterruptedException , TimeoutException { // Maintain compatibility with Grid 1.x, which had the ability to // specify how long to wait before canceling a request. GridHubConfiguration configuration = getRegistry ( ) . getHub ( ) . getConfiguration ( ) ; Integer newSessionWaitTimeout = configuration . newSessionWaitTimeout != null ? configuration . newSessionWaitTimeout : 0 ; if ( newSessionWaitTimeout > 0 ) { if ( ! sessionAssigned . await ( newSessionWaitTimeout . longValue ( ) , TimeUnit . MILLISECONDS ) ) { throw new TimeoutException ( "Request timed out waiting for a node to become available." ) ; } } else { // Wait until a proxy becomes available to handle the request. sessionAssigned . await ( ) ; } }
wait for the registry to match the request with a TestSlot .