Class RefreshNodeTask

  • All Implemented Interfaces:
    Externalizable, Serializable, Runnable, ClusterTask<Void>

    public class RefreshNodeTask
    extends NodeTask
    Forces the node to be refreshed from the database. This will load a node from the database and then add it to the service. If the node already existed it will be replaced, thereby refreshing it from persistence. Note that this task aims to update in-memory state only: it will not apply affiliation changes to persistent data storage (it is assumed that the cluster node where the task originated takes responsibility for that). As a result, this task might not apply changes if the node that is the subject of this task is currently not loaded in-memory of the cluster node on which this task operates. Unlike other cluster tasks, this task will forcefully (re)load the node from backend storage on every cluster node where the task is executed. This can add significant overhead, and should be avoided if possible.
    Author:
    Robin Collier
    See Also:
    Serialized Form
    • Constructor Detail

      • RefreshNodeTask

        public RefreshNodeTask()
        This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise.
      • RefreshNodeTask

        public RefreshNodeTask​(@Nonnull
                               Node node)
        Constructs a new task that refreshes a specific pubsub node.
        Parameters:
        node - The pubsub node that this task relates to.
    • Method Detail

      • run

        public void run()