Package tigase.server.cluster.strategy.cmd

# 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:
  `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(String name, OnlineUsersCachingStrategy strat)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `executeCommand(tigase.xmpp.jid.JID fromNode, Set<tigase.xmpp.jid.JID> visitedNodes, Map<String,String> data, 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`

  ### Methods inherited from class tigase.cluster.api.CommandListenerAbstract

  `compareTo, equals, getName, getPriority, getStatistics, hashCode, setName, setPriority`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RequestSyncOnlineCmd

    public RequestSyncOnlineCmd(String name, OnlineUsersCachingStrategy strat)

- ## Method Details

  - ### executeCommand

    public void executeCommand(tigase.xmpp.jid.JID fromNode, Set<tigase.xmpp.jid.JID> visitedNodes, Map<String,String> data, 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 correctly `synchronised` state.
    Parameters:
      `fromNode` - `JID` of the originating node from which request came.
      `visitedNodes` - `Set` containing `JID` of all already visited nodes
      `data` - additional data
      `packets` - `Queue` holding all originally received packets.
    Throws:
      `tigase.cluster.api.ClusterCommandException`