public void process(@Nonnull final OccupantUpdatedTask task)
    {
        Log.debug("Processing task to update occupant {} - {}", task.getRealJID(), task.getOldNickname());

        final Occupant oldOccupant = new Occupant(task.getRoomName(), task.getOldNickname(), task.getRealJID());
        final Occupant newOccupant = new Occupant(task.getRoomName(), task.getNewNickname(), task.getRealJID());

        mutex.writeLock().lock();
        try {
            if (oldOccupant.isFederated()) { // Old and New occupant will both either be federated or not, as they're using the same realJID value.
                replaceFederatedOccupant(oldOccupant, newOccupant);
            } else {
                replaceLocalOccupant(oldOccupant, newOccupant, task.getOriginator());
            }
        } finally {
            mutex.writeLock().unlock();
        }
    }
Updates the data maintained by this instance to perform post-cluster event maintenance, based on the data from
the clustered task.

@param task Cluster task that informs of an update for an existing occupant
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/OccupantManager.java