public class TaskExecutor extends java.lang.Object implements TaskExecutorInterface
TaskExecutorInterface
,
RequestHandler
,
TaskQueue
,
TaskQueueInterface
,
Lang
Constructor and Description |
---|
TaskExecutor(TaskQueueInterface queue,
java.lang.String dockerImg,
double dockerExecTime,
java.lang.String dockerMemLimit)
Constructs an executor using docker as sandbox
|
Modifier and Type | Method and Description |
---|---|
void |
executeTasks()
execute tasks contained in the queue using docker as sandbox,
an execution can be a compilation, an interpretation or compilation + execution
|
Lang[] |
getLanguages()
Retrieve languages supported by this executor
|
void |
setExecutionTime(double timeInSec)
Set execution duration for a container
|
void |
setMemLimit(java.lang.String memLimit)
Set memory limit for a container
|
public TaskExecutor(TaskQueueInterface queue, java.lang.String dockerImg, double dockerExecTime, java.lang.String dockerMemLimit)
queue
- the queue containing the tasksdockerImg
- the docker image to usedockerExecTime
- the execution time for containersdockerMemLimit
- the memory limit for containerspublic void executeTasks()
executeTasks
in interface TaskExecutorInterface
public void setExecutionTime(double timeInSec)
setExecutionTime
in interface TaskExecutorInterface
timeInSec
- time in secondpublic void setMemLimit(java.lang.String memLimit)
setMemLimit
in interface TaskExecutorInterface
memLimit
- memory limit (e.g : 128m)public Lang[] getLanguages()
getLanguages
in interface TaskExecutorInterface