private void handleGetCandidateResult(PlacementTask currentState,Operation postOperation,Map<String,ServerAddress> candidates,Stopwatch placementWatch){
  ServiceUtils.logInfo(this,"elapsed-time flat-place-get-candidates %d milliseconds",placementWatch.elapsed(TimeUnit.MILLISECONDS));
  if (candidates.isEmpty()) {
    String msg=String.format("Place failure, constraints cannot be satisfied for request: %s",currentState.resource);
    PlacementTask patchState=buildPatch(TaskState.TaskStage.FAILED,currentState.taskState.isDirect,null);
    patchState.resultCode=PlaceResultCode.NO_SUCH_RESOURCE;
    patchState.error=msg;
    failTask(patchState,new Throwable(msg),postOperation);
    return;
  }
  ServiceUtils.logInfo(this,"Sending place requests to %s with timeout %d ms",candidates,currentState.timeoutMs);
  Stopwatch scoreCandidatesStopwatch=Stopwatch.createStarted();
  queryHostsForScores(currentState.resource,candidates,null);
}

private void handleGetCandidateResult ( PlacementTask currentState , Operation postOperation , Map < String , ServerAddress > candidates , Stopwatch placementWatch ) { ServiceUtils . logInfo ( this , "elapsed-time flat-place-get-candidates %d milliseconds" , placementWatch . elapsed ( TimeUnit . MILLISECONDS ) ) ; if ( candidates . isEmpty ( ) ) { String msg = String . format ( "Place failure, constraints cannot be satisfied for request: %s" , currentState . resource ) ; PlacementTask patchState = buildPatch ( TaskState . TaskStage . FAILED , currentState . taskState . isDirect , null ) ; patchState . resultCode = PlaceResultCode . NO_SUCH_RESOURCE ; patchState . error = msg ; failTask ( patchState , new Throwable ( msg ) , postOperation ) ; return ; } ServiceUtils . logInfo ( this , "Sending place requests to %s with timeout %d ms" , candidates , currentState . timeoutMs ) ; Stopwatch scoreCandidatesStopwatch = Stopwatch . createStarted ( ) ; queryHostsForScores ( currentState . resource , candidates , null ) ; }
helper method to process the candidates returned by getpotentialcandidates .
