public synchronized void doneTask(int stealerId, int donorId) {
        removeNodesFromWorkerList(Arrays.asList(stealerId, donorId));
        numTasksExecuting--;
        doneSignal.countDown();
        // Try and schedule more tasks now that resources may be available to do
        // so.
        scheduleMoreTasks();
    }
public synchronized void doneTask ( int stealerId , int donorId ) { removeNodesFromWorkerList ( Arrays . asList ( stealerId , donorId ) ) ; numTasksExecuting -- ; doneSignal . countDown ( ) ; scheduleMoreTasks ( ) ; }
Method must be invoked upon completion of a rebalancing task. It is the
task's responsibility to do so.

@param stealerId
@param donorId