@Override
    public void setLogBatchGracePeriod( Duration interval )
    {
        if ( this.logBatchGracePeriod.equals( interval ) ) {
            return;
        }

        this.logBatchGracePeriod = interval;
        if (archiver != null) {
            archiver.setGracePeriod(interval);
        }
        MUCPersistenceManager.setProperty(chatServiceName, "tasks.log.batchgrace", Long.toString( interval.toMillis() ) );
    }
Sets the maximum time to wait for a next incoming entry before writing the batch to the database.
@param interval the maximum time to wait for a next incoming entry before writing the batch to the database.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java