public synchronized void restoreTaskUpdates ( List < TaskInfo > tasks ) { for ( TaskInfo task : tasks ) { Pair < Long , Integer > id = new Pair <> ( task . getJobId ( ) , task . getTaskId ( ) ) ; if ( ! mTaskUpdates . containsKey ( id ) ) { mTaskUpdates . put ( id , task ) ; } } }
Adds the given tasks to the task updates data structure . If there is already an update for the specified task it is not changed .