public synchronized void add( final Archiver archiver )
    {
        if (tasks.containsKey( archiver.getId() ) )
        {
            throw new IllegalStateException( "A task with ID " + archiver.getId() + " has already been added." );
        }

        executor.submit( archiver );
        tasks.put( archiver.getId(), archiver );
    }
Adds a new task, that is started immediately.

@param archiver The task to be added. Cannot be null.
xmppserver/src/main/java/org/jivesoftware/openfire/archive/ArchiveManager.java