main/src/main/java/org/onap/policy/pap/main/comm/PdpRequests.java
/**
     * Starts publishing the next request in the queue.
     *
     * @param request the request that just completed
     * @return {@code true} if there is another request in the queue, {@code false} if all
     *         requests for this PDP have been processed
     */
Starts publishing the next request in the queue.
@param request the request that just completed
@return  true if there is another request in the queue,  false if all
requests for this PDP have been processed
Starts publishing the next request in the queue . @param request the request that just completed @return true if there is another request in the queue false if all requests for this PDP have been processed
public boolean startNextRequest(Request request) {
        if (!zapRequest(curIndex, request)) {
            for (int x = 0; x < MAX_PRIORITY; ++x) {
                if (zapRequest(x, request)) {
                    break;
                }
            }
        }
        for (curIndex = MAX_PRIORITY - 1; curIndex >= 0; --curIndex) {
            if (singletons[curIndex] != null) {
                logger.info("{} start publishing priority {}", pdpName, curIndex);
                singletons[curIndex].startPublishing();
                return true;
            }
        }
        logger.info("{} has no more requests", pdpName);
        curIndex = 0;
        return false;
    }
public boolean startNextRequest ( Request request ) { if ( ! zapRequest ( curIndex , request ) ) { for ( int x = 0 ; x < MAX_PRIORITY ; ++ x ) { if ( zapRequest ( x , request ) ) { break ; } } } for ( curIndex = MAX_PRIORITY - 1 ; curIndex >= 0 ; -- curIndex ) { if ( singletons [ curIndex ] != null ) { logger . info ( "{} start publishing priority {}" , pdpName , curIndex ) ; singletons [ curIndex ] . startPublishing ( ) ; return true ; } } logger . info ( "{} has no more requests" , pdpName ) ; curIndex = 0 ; return false ; }
Starts publishing the next request in the queue.
Starts publishing the next request in the queue .
// not at curIndex - look for it in other indices // find/start the highest priority request