public void filterUnsafeOrUnnecessaryRequest ( Map < String , NodeReqResponse > nodeDataMapValidSource , Map < String , NodeReqResponse > nodeDataMapValidSafe ) { for ( Entry < String , NodeReqResponse > entry : nodeDataMapValidSource . entrySet ( ) ) { String hostName = entry . getKey ( ) ; NodeReqResponse nrr = entry . getValue ( ) ; Map < String , String > map = nrr . getRequestParameters ( ) ; /** * 20130507: will generally apply to all requests: if have this * field and this field is false */ if ( map . containsKey ( PcConstants . NODE_REQUEST_WILL_EXECUTE ) ) { Boolean willExecute = Boolean . parseBoolean ( map . get ( PcConstants . NODE_REQUEST_WILL_EXECUTE ) ) ; if ( ! willExecute ) { logger . info ( "NOT_EXECUTE_COMMAND " + " on target: " + hostName + " at " + PcDateUtils . getNowDateTimeStrStandard ( ) ) ; continue ; } } // now safely to add this node in. nodeDataMapValidSafe . put ( hostName , nrr ) ; } // end for loop }
Filter unsafe or unnecessary request .