agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/JobRequestQueueProcessor.java
/**
	 * Validates that the queue supports the number of nodes, processors per node, memory and
	 * requestedTime provided. If any of these values are null or the given values exceed the queue
	 * limits, it returns false.
	 *
	 * @param queue the BatchQueue to check against
	 * @param nodes a positive integer value or -1 for no limit
	 * @param processors positive integer value or -1 for no limit
	 * @param memory memory in GB or -1 for no limit
	 * @param requestedTime time in hh:mm:ss format
	 * @return true if all the values are non-null and within the limits of the queue
	 */
Validates that the queue supports the number of nodes, processors per node, memory and
requestedTime provided. If any of these values are null or the given values exceed the queue
limits, it returns false.


Validates that the queue supports the number of nodes processors per node memory and requestedTime provided . If any of these values are null or the given values exceed the queue limits it returns false .
private boolean validateBatchSubmitParameters(BatchQueue queue, Long nodes, Long processors, Double memory, String requestedTime)
	{
		if (queue == null ||
			nodes == null ||  nodes == 0 || nodes < -1 ||
			processors == null || processors == 0 || processors < -1 ||
			memory == null || memory == 0 || memory < -1 ||
			StringUtils.isEmpty(requestedTime) || StringUtils.equals("00:00:00", requestedTime))
		{
			return false;
		}
		if (queue.getMaxNodes() > 0 && queue.getMaxNodes() < nodes) {
			return false;
		}
		if (queue.getMaxProcessorsPerNode() > 0 && queue.getMaxProcessorsPerNode() < processors) {
			return false;
		}
		if (queue.getMaxMemoryPerNode() > 0 && queue.getMaxMemoryPerNode() < memory) {
			return false;
		}
		return queue.getMaxRequestedTime() == null || TimeUtils.compareRequestedJobTimes(queue.getMaxRequestedTime(), requestedTime) != -1;
	}
private boolean validateBatchSubmitParameters ( BatchQueue queue , Long nodes , Long processors , Double memory , String requestedTime ) { if ( queue == null || nodes == null || nodes == 0 || nodes < - 1 || processors == null || processors == 0 || processors < - 1 || memory == null || memory == 0 || memory < - 1 || StringUtils . isEmpty ( requestedTime ) || StringUtils . equals ( "00:00:00" , requestedTime ) ) { return false ; } if ( queue . getMaxNodes ( ) > 0 && queue . getMaxNodes ( ) < nodes ) { return false ; } if ( queue . getMaxProcessorsPerNode ( ) > 0 && queue . getMaxProcessorsPerNode ( ) < processors ) { return false ; } if ( queue . getMaxMemoryPerNode ( ) > 0 && queue . getMaxMemoryPerNode ( ) < memory ) { return false ; } return queue . getMaxRequestedTime ( ) == null || TimeUtils . compareRequestedJobTimes ( queue . getMaxRequestedTime ( ) , requestedTime ) != - 1 ; }
Validates that the queue supports the number of nodes, processors per node, memory and
 requestedTime provided.
Validates that the queue supports the number of nodes processors per node memory and requestedTime provided .