use of teammates.common.util.TaskWrapper in project teammates by TEAMMATES.
the class MockTaskQueuer method addTask.
@Override
protected void addTask(String queueName, String workerUrl, Map<String, String> paramMap) {
Map<String, String[]> multisetParamMap = new HashMap<>();
paramMap.forEach((key, value) -> multisetParamMap.put(key, new String[] { value }));
TaskWrapper task = new TaskWrapper(queueName, workerUrl, multisetParamMap);
tasksAdded.add(task);
}
use of teammates.common.util.TaskWrapper in project teammates by TEAMMATES.
the class MockTaskQueuer method getNumberOfTasksAdded.
@Override
public Map<String, Integer> getNumberOfTasksAdded() {
Map<String, Integer> numberOfTasksAdded = new HashMap<>();
for (TaskWrapper task : tasksAdded) {
String queueName = task.getQueueName();
int oldTaskCount = numberOfTasksAdded.getOrDefault(queueName, 0);
numberOfTasksAdded.put(queueName, oldTaskCount + 1);
}
return numberOfTasksAdded;
}
use of teammates.common.util.TaskWrapper in project teammates by TEAMMATES.
the class MockTaskQueuer method addTaskMultisetParam.
@Override
protected void addTaskMultisetParam(String queueName, String workerUrl, Map<String, String[]> paramMap) {
TaskWrapper task = new TaskWrapper(queueName, workerUrl, paramMap);
tasksAdded.add(task);
}
Aggregations