class ModifySubscriptionTask extends SubscriptionTask
{
    private static final Logger log = LoggerFactory.getLogger(ModifySubscriptionTask.class);

    /**
     * This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
     */
    public ModifySubscriptionTask()
    {
    }

    /**
     * Constructs a new task that modifies a subscription to a pubsub node.
     *
     * @param subscription The to-be-modified subscription
     */
    public ModifySubscriptionTask(@Nonnull final NodeSubscription subscription)
    {
        super(subscription);
    }

    @Override
    public void run()
    {<FILL_FUNCTION_BODY>}
}

        // Note: this implementation should apply changes in-memory state only. It explicitly needs not update
        // persisted data storage, as this can be expected to be done by the cluster node that issued this task.
        // Applying such changes in this task would, at best, needlessly require resources.
        log.debug("[TASK] Modify subscription : {}", toString());

        final Optional<Node> optNode = getNodeIfLoaded();

        // 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 (!optNode.isPresent()) {
            return;
        }

        final Node node = optNode.get();

        // Forcefully (re)load the subscription from the database, which resets any in-memory representation.
        // TODO OF-2140 Remove database interaction. Instead of reloading, modify the existing in-memory representation with data from this task.
        XMPPServer.getInstance().getPubSubModule().getPersistenceProvider().loadSubscription(node, getSubscriptionId());
    
<methods>public void <init>() ,public void <init>(org.jivesoftware.openfire.pubsub.NodeSubscription) ,public JID getOwner() ,public org.jivesoftware.openfire.pubsub.NodeSubscription.State getState() ,public JID getSubscriberJid() ,public java.lang.String getSubscriptionId() ,public Optional<org.jivesoftware.openfire.pubsub.NodeSubscription> getSubscriptionIfLoaded() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public java.lang.String toString() ,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private JID owner,private org.jivesoftware.openfire.pubsub.NodeSubscription.State state,private java.lang.String subId,private JID subJid