public synchronized void addTask ( int taskId ) { Preconditions . checkArgument ( ! mTaskIdToInfo . containsKey ( taskId ) , "" ) ; mTaskIdToInfo . put ( taskId , new TaskInfo ( ) . setJobId ( mId ) . setTaskId ( taskId ) . setStatus ( Status . CREATED ) . setErrorMessage ( "" ) . setResult ( null ) ) ; }
Registers a task .