class AgentContainerLimitSystemConstraint implements SystemConstraint {

    @Override
    public Result evaluate(TaskRequest taskRequest, VirtualMachineCurrentState targetVM, TaskTrackerState taskTrackerState) {
        int total = targetVM.getRunningTasks().size() + targetVM.getTasksCurrentlyAssigned().size();
        int max = Math.max(1, configuration.getMaxTasksPerMachine());
        return total < max ? VALID : TOO_MANY_CONTAINERS;
    }

    @Inject public  AgentContainerLimitSystemConstraint(SchedulerConfiguration configuration);

}