@Override
    public void run()
    {
        log.debug("[TASK] Removing node - nodeID: {}", getNodeId());

        final Optional<PubSubService> optService = getServiceIfLoaded();

        // This will only occur if a PEP service is not loaded on this particular cluster node. We can safely do nothing
        // in this case since any changes that might have been applied here will also have been applied to the database
        // by the cluster node where this task originated, meaning that those changes get loaded from the database when
        // the pubsub node is retrieved from the database in the future (OF-2077)
        if (optService.isEmpty()) {
            return;
        }

        optService.get().removeNode(getNodeId());
    }
Constructs a new task that removes a specific node from a pubsub node.

@param node The pubsub node that this task relates to.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/cluster/RemoveNodeTask.java