@Override
    public void leftCluster() {
        // The local cluster node left the cluster.
        if (XMPPServer.getInstance().isShuttingDown()) {
            // Do not put effort in restoring the correct state if we're shutting down anyway.
            return;
        }

        // Upon leaving a cluster, clustered caches are reset to their local equivalent (by the swap from the clustered
        // cache implementation to the default cache implementation that's done in the implementation of
        // org.jivesoftware.util.cache.CacheFactory.leftCluster). This means that they now hold no data (as a new cache
        // has been created). Data that's available on the local node needs to be added again.
        restoreCacheContent();

        for (NodeID nodeID : new HashSet<>(directedPresenceAddressingByClusterNode.keySet())) {
            // Clean up directed presences sent from entities hosted in the leaving node to local entities
            // Clean up directed presences sent to entities hosted in the leaving node from local entities
            cleanupDirectedPresences(nodeID);
        }
    }
Checks if the packet is a presence stanza that intends to reflect an update back to the client from which the update originated.

@param packet The stanza (cannot be null.
@return true if the packet is presence reflection, otherwise false.
xmppserver/src/main/java/org/jivesoftware/openfire/handler/PresenceUpdateHandler.java