96979899100101102103104105106
try { if (timeout < 0) { return (Message) future.get(); } else if (timeout == 0) { return (Message) future.peek(); } else { return (Message) future.timedGet(timeout); } }
202203204205206207208209210211212
return; } synchronized (results) { for (int i = 0; i < results.length; i++) { FutureResult result = results[i]; if ( null == result.peek() ) { result.set(aResult); break; } } }
186187188189190191192193194195196
RequestID id = (RequestID) anID; FutureResult[] results; results = (FutureResult[]) responses.get(id.id); for (int i = 0; i < results.length; i++) { FutureResult result = results[i]; if ( null == result.peek() ) { result.set(aResult); break; } } }