@SuppressWarnings("unchecked")
    public void receiveResponse(Object response_value, Address sender, boolean is_exception) {
        Rsp<T> rsp;
        if(isDone() || (rsp=rsps.get(sender)) == null)
            return;

        RspFilter rsp_filter=options.rspFilter();
        lock.lock();
        try {
            if(!rsp.wasReceived()) {
                if(!(rsp.wasSuspected() || rsp.wasUnreachable()))
                    num_received++;
                if(rsp_filter == null || rsp_filter.isAcceptable(response_value, sender)) {
                    if(is_exception && response_value instanceof Throwable)
                        rsp.setException((Throwable)response_value);
                    else
                        rsp.setValue((T)response_value);
                    num_valid++;
                }
            }

            if(responsesComplete() || (rsp_filter != null && !rsp_filter.needMoreResponses())) {
                complete(this.rsps);
                corrDone();
            }
        }
        finally {
            lock.unlock();
        }
    }
@ SuppressWarnings ( "unchecked" ) public void receiveResponse ( Object response_value , Address sender , boolean is_exception ) { Rsp < T > rsp ; if ( isDone ( ) || ( rsp = rsps . get ( sender ) ) == null ) return ; RspFilter rsp_filter = options . rspFilter ( ) ; lock . lock ( ) ; try { if ( ! rsp . wasReceived ( ) ) { if ( ! ( rsp . wasSuspected ( ) || rsp . wasUnreachable ( ) ) ) num_received ++ ; if ( rsp_filter == null || rsp_filter . isAcceptable ( response_value , sender ) ) { if ( is_exception && response_value instanceof Throwable ) rsp . setException ( ( Throwable ) response_value ) ; else rsp . setValue ( ( T ) response_value ) ; num_valid ++ ; } } if ( responsesComplete ( ) || ( rsp_filter != null && ! rsp_filter . needMoreResponses ( ) ) ) { complete ( this . rsps ) ; corrDone ( ) ; } } finally { lock . unlock ( ) ; } }
<b>Callback</b> (called by RequestCorrelator or Transport).
Adds a response to the response table. When all responses have been received, {@code execute()} returns.