Class RefreshNodeTask
java.lang.Object
org.jivesoftware.openfire.pubsub.cluster.NodeTask
org.jivesoftware.openfire.pubsub.cluster.RefreshNodeTask
- All Implemented Interfaces:
Externalizable
,Serializable
,Runnable
,ClusterTask<Void>
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:
-
Field Summary
Fields inherited from class org.jivesoftware.openfire.pubsub.cluster.NodeTask
nodeId, serviceId, uniqueNodeIdentifier
-
Constructor Summary
ConstructorsConstructorDescriptionThis no-argument constructor is provided for serialization purposes.RefreshNodeTask
(Node node) Constructs a new task that refreshes a specific pubsub node. -
Method Summary
Methods inherited from class org.jivesoftware.openfire.pubsub.cluster.NodeTask
getNodeId, getNodeIfLoaded, getResult, getServiceIfLoaded, getUniqueNodeIdentifier, readExternal, writeExternal
-
Constructor Details
-
RefreshNodeTask
public RefreshNodeTask()This no-argument constructor is provided for serialization purposes. It should generally not be used otherwise. -
RefreshNodeTask
Constructs a new task that refreshes a specific pubsub node.- Parameters:
node
- The pubsub node that this task relates to.
-
-
Method Details
-
run
public void run()
-