@Override
    public List<PublishedItem> getPublishedItems( final LeafNode node, final int maxRows )
    {
        flushPendingChanges( node.getUniqueIdentifier() );
        return delegate.getPublishedItems( node, maxRows );
    }
Persists any changes that have been applied to the caches by invoking the relevant methods of the delegate.

A flush can be performed either local (typically used to periodically persist data) or cluster-wide (useful to
ensure that a particular state is reached, cluster-wide).

@param sendToCluster set to 'true' to trigger a flush on all cluster nodes. If false, a flush will occur only on
                     the local node.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/CachingPubsubPersistenceProvider.java