this.asyncRequestMap.addOrReplace(request);
if(request.isSpotRequest()){
if (!this.remoteEnabled) {
throw new ResourceRequestDeniedException("Spot instances are disabled");
}
if(this.lager.eventLog){
logger.info(Lager.ev(-1) + "Spot Instance request arrived: " + request.toString() + ". Changing price and reallocating requests.");
}
changePriceAndAllocateRequests();
} else {
if (!this.backfillEnabled) {
throw new ResourceRequestDeniedException("Backfill is disabled");
}
if(this.lager.eventLog){
logger.info(Lager.ev(-1) + "Backfill request arrived: " + request.toString() + ".");
}
allocateBackfillRequests();