public synchronized void complete(long taskId) throws IllegalArgumentException {
        TaskStatus status = tasks.remove(taskId);
        if (status == null) {
            throw new IllegalArgumentException("TaskId is not in map:" + taskId);
        }
    }
Removes the task from the collection of currently running tasks.

@param taskId
@throws IllegalArgumentException if there is no task by that taskId in the collection
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/ServerStatus.java