Class RequestSyncOnlineCmd
- java.lang.Object
-
- tigase.cluster.api.CommandListenerAbstract
-
- tigase.server.cluster.strategy.cmd.CachingCmdAbstract
-
- tigase.server.cluster.strategy.cmd.TrafficSyncCmdAbstract
-
- tigase.server.cluster.strategy.cmd.RequestSyncOnlineCmd
-
- All Implemented Interfaces:
java.lang.Comparable<tigase.cluster.api.CommandListener>
,tigase.cluster.api.CommandListener
public class RequestSyncOnlineCmd extends TrafficSyncCmdAbstract
- Author:
- kobit
-
-
Field Summary
-
Fields inherited from class tigase.server.cluster.strategy.cmd.CachingCmdAbstract
CONNECTION_ID, CREATION_TIME, LOGIN_TIME, PRESENCE_TYPE_INITIAL, PRESENCE_TYPE_KEY, RESOURCE, SM_ID, USER_ID, XMPP_SESSION_ID
-
-
Constructor Summary
Constructors Constructor Description RequestSyncOnlineCmd(java.lang.String name, OnlineUsersCachingStrategy strat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeCommand(tigase.xmpp.jid.JID fromNode, java.util.Set<tigase.xmpp.jid.JID> visitedNodes, java.util.Map<java.lang.String,java.lang.String> data, java.util.Queue<tigase.xml.Element> packets)
Method is responsible for processing request to synchronisation command.-
Methods inherited from class tigase.server.cluster.strategy.cmd.TrafficSyncCmdAbstract
getSyncInTraffic, getSyncOutTraffic, incSyncInTraffic, incSyncOutTraffic
-
Methods inherited from class tigase.server.cluster.strategy.cmd.CachingCmdAbstract
getConnectionRecord, getStrategy
-
-
-
-
Constructor Detail
-
RequestSyncOnlineCmd
public RequestSyncOnlineCmd(java.lang.String name, OnlineUsersCachingStrategy strat)
-
-
Method Detail
-
executeCommand
public void executeCommand(tigase.xmpp.jid.JID fromNode, java.util.Set<tigase.xmpp.jid.JID> visitedNodes, java.util.Map<java.lang.String,java.lang.String> data, java.util.Queue<tigase.xml.Element> packets) throws tigase.cluster.api.ClusterCommandException
Method is responsible for processing request to synchronisation command. It creates a response packet(s) containing all users connection IDs (CIDs) on the given node and sends them back to node which originated the request. Records are split into smaller packet for performance reasons. If nor record is present a command with empty data is sent to allow setting correctlysynchronised
state.- Parameters:
fromNode
-JID
of the originating node from which request came.visitedNodes
-Set
containingJID
of all already visited nodesdata
- additional datapackets
-Queue
holding all originally received packets.- Throws:
tigase.cluster.api.ClusterCommandException
-
-