tigase.cluster.strategy
public class SMNonCachingAllNodes extends Object implements ClusteringStrategyIfc
| Constructor and Description |
|---|
SMNonCachingAllNodes() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsJid(tigase.xmpp.BareJID jid)
Method description
|
List<tigase.xmpp.JID> |
getAllNodes()
Method description
|
tigase.xmpp.JID[] |
getConnectionIdsForJid(tigase.xmpp.BareJID jid)
Method description
|
ConnectionRecord |
getConnectionRecord(tigase.xmpp.JID jid)
Returns a ConnectionRecord object associated with this user's full JID if
it exists in the cache or null if it does not.
|
Set<ConnectionRecord> |
getConnectionRecords(tigase.xmpp.BareJID bareJID)
Returns a set with all ConnectionRecords found in the cache for a given
user ID, that is BareJID.
|
Map<String,Object> |
getDefaults(Map<String,Object> params)
Method description
|
Object |
getInternalCacheData()
Deprecated.
|
List<tigase.xmpp.JID> |
getNodesForJid(tigase.xmpp.JID jid)
Method description
|
List<tigase.xmpp.JID> |
getNodesForPacketForward(tigase.xmpp.JID fromNode,
Set<tigase.xmpp.JID> visitedNodes,
Packet packet)
The method allows the strategy implementation to control to which cluster
nodes forward the given packet.
|
List<tigase.xmpp.JID> |
getNodesForUserConnect(tigase.xmpp.JID jid)
The method allows the strategy implementation to control to which cluster
nodes send the notification about user's new connection event.
|
List<tigase.xmpp.JID> |
getNodesForUserDisconnect(tigase.xmpp.JID jid)
The method allows the strategy implementation to control to which cluster
nodes send the notification about user's disconnection event.
|
void |
getStatistics(StatisticsList list)
Method description
|
boolean |
hasCompleteJidsInfo()
Method description
|
protected boolean |
isSuitableForForward(Packet packet) |
boolean |
needsSync()
Method description
|
void |
nodeConnected(tigase.xmpp.JID jid)
Method description
|
void |
nodeDisconnected(tigase.xmpp.JID jid)
Method description
|
void |
presenceUpdate(tigase.xml.Element presence,
ConnectionRecord rec)
The method is called on user's presence update received from a remote
cluster node.
|
void |
setProperties(Map<String,Object> props)
Method description
|
void |
setSessionManagerHandler(SessionManagerHandler sm)
The method allows to obtain SessionManagerHandler object by the strategy.
|
void |
userDisconnected(Queue<Packet> results,
ConnectionRecord rec)
Method description
|
void |
usersConnected(Queue<Packet> results,
ConnectionRecord... rec)
Method description
|
public void setSessionManagerHandler(SessionManagerHandler sm)
ClusteringStrategyIfcsetSessionManagerHandler in interface ClusteringStrategyIfcsm - is an instance of the SessionManagerHandler class.public boolean containsJid(tigase.xmpp.BareJID jid)
containsJid in interface OnlineJidsReporterjid - public List<tigase.xmpp.JID> getAllNodes()
getAllNodes in interface ClusteringStrategyIfcpublic tigase.xmpp.JID[] getConnectionIdsForJid(tigase.xmpp.BareJID jid)
getConnectionIdsForJid in interface OnlineJidsReporterjid - public Map<String,Object> getDefaults(Map<String,Object> params)
getDefaults in interface ClusteringStrategyIfcparams - public List<tigase.xmpp.JID> getNodesForJid(tigase.xmpp.JID jid)
getNodesForJid in interface ClusteringStrategyIfcjid - public void getStatistics(StatisticsList list)
getStatistics in interface ClusteringStrategyIfclist - public boolean hasCompleteJidsInfo()
hasCompleteJidsInfo in interface OnlineJidsReporterpublic boolean needsSync()
needsSync in interface ClusteringStrategyIfcpublic void nodeConnected(tigase.xmpp.JID jid)
nodeConnected in interface ClusteringStrategyIfcjid - public void nodeDisconnected(tigase.xmpp.JID jid)
nodeDisconnected in interface ClusteringStrategyIfcjid - public void setProperties(Map<String,Object> props)
setProperties in interface ClusteringStrategyIfcprops - public void userDisconnected(Queue<Packet> results, ConnectionRecord rec)
userDisconnected in interface ClusteringStrategyIfcsm - results - jid - public void usersConnected(Queue<Packet> results, ConnectionRecord... rec)
usersConnected in interface ClusteringStrategyIfcsm - results - jid - public List<tigase.xmpp.JID> getNodesForPacketForward(tigase.xmpp.JID fromNode, Set<tigase.xmpp.JID> visitedNodes, Packet packet)
ClusteringStrategyIfcgetNodesForPacketForward in interface ClusteringStrategyIfcfromNode - a source address if the packet was forwarded from a different
node, this may be null if the packet was generated on this node.visitedNodes - a list of cluster nodes through which the packet already traveled,
this parameter can be null if the packet was generated on this
nodepacket - a packet which is supposed to be sent to other node.protected boolean isSuitableForForward(Packet packet)
public List<tigase.xmpp.JID> getNodesForUserConnect(tigase.xmpp.JID jid)
ClusteringStrategyIfcgetNodesForUserConnect in interface ClusteringStrategyIfcpublic List<tigase.xmpp.JID> getNodesForUserDisconnect(tigase.xmpp.JID jid)
ClusteringStrategyIfcgetNodesForUserDisconnect in interface ClusteringStrategyIfc@Deprecated public Object getInternalCacheData()
ClusteringStrategyIfcgetInternalCacheData in interface ClusteringStrategyIfcpublic Set<ConnectionRecord> getConnectionRecords(tigase.xmpp.BareJID bareJID)
ClusteringStrategyIfcgetConnectionRecords in interface ClusteringStrategyIfcbareJID - is an instance of the user's BareJID, that is account ID.public ConnectionRecord getConnectionRecord(tigase.xmpp.JID jid)
ClusteringStrategyIfcgetConnectionRecord in interface ClusteringStrategyIfcjid - is an instance of the user's full JID.public void presenceUpdate(tigase.xml.Element presence,
ConnectionRecord rec)
ClusteringStrategyIfcpresenceUpdate in interface ClusteringStrategyIfcpresence - Packet received from a remote cluster node.rec - is an instance of the user's ConnectionRecord.Copyright © 2013 Tigase. All rights reserved.