public abstract class SMNonCachingAllNodes extends Object implements ClusteringStrategyIfc<ConnectionRecord>
Constructor and Description |
---|
SMNonCachingAllNodes() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsJid(BareJID jid)
The method checks whether the given JID is known to the installation, either user connected to local machine or
any of the cluster nodes.
|
JID[] |
getConnectionIdsForJid(BareJID jid)
Retrieve all connection IDs (CIDs) for the given user.
|
Set<ConnectionRecord> |
getConnectionRecords(BareJID bareJID)
Returns a set with all ConnectionRecords found in the cache for a given user ID, that is BareJID.
|
List<JID> |
getNodesConnected()
The method returns all cluster nodes currently connected to the cluster node.
|
List<JID> |
getNodesForJid(JID jid) |
List<JID> |
getNodesForPacketForward(JID fromNode,
Set<JID> visitedNodes,
Packet packet) |
List<JID> |
getNodesForUserConnect(JID jid) |
List<JID> |
getNodesForUserDisconnect(JID jid) |
void |
getStatistics(StatisticsList list)
Add the strategy statistics to the List.
|
boolean |
hasCompleteJidsInfo()
Method checks whether the clustering strategy has a complete JIDs info.
|
protected boolean |
isSuitableForForward(Packet packet) |
void |
nodeConnected(JID jid)
This is a handler method which is called when a new node connects to the cluster.
|
void |
nodeDisconnected(JID jid)
This is a handler method which is called when a node disconnects from the cluster.
|
void |
setProperties(Map<String,Object> props)
Method used to pass configuration parameters to the class.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnectionRecord, getConnectionRecordInstance, getDefaults, getInfo, handleLocalPacket, handleLocalPresenceSet, handleLocalResourceBind, handleLocalUserChangedConnId, handleLocalUserLogin, handleLocalUserLogout, processPacket, setClusterController
containsJidLocally, containsJidLocally
everyHour, everyMinute, everySecond, getStatistics, setStatisticsPrefix, statisticExecutedIn
public boolean containsJid(BareJID jid)
OnlineJidsReporter
containsJid
in interface OnlineJidsReporter
jid
- a user's JID for whom we query information.public void nodeConnected(JID jid)
ClusteringStrategyIfc
nodeConnected
in interface ClusteringStrategyIfc<ConnectionRecord>
jid
- is a cluster node id.public void nodeDisconnected(JID jid)
ClusteringStrategyIfc
nodeDisconnected
in interface ClusteringStrategyIfc<ConnectionRecord>
jid
- is a cluster node id.public List<JID> getNodesConnected()
ClusteringStrategyIfc
getNodesConnected
in interface ClusteringStrategyIfc<ConnectionRecord>
public JID[] getConnectionIdsForJid(BareJID jid)
OnlineJidsReporter
getConnectionIdsForJid
in interface OnlineJidsReporter
jid
- id of the user for which we want to retrieve the list.JID
containing all Connection IDs (CIDs) for the given user.public Set<ConnectionRecord> getConnectionRecords(BareJID bareJID)
ClusteringStrategyIfc
getConnectionRecords
in interface ClusteringStrategyIfc<ConnectionRecord>
bareJID
- is an instance of the user's BareJID, that is account ID.public List<JID> getNodesForPacketForward(JID fromNode, Set<JID> visitedNodes, Packet packet)
public void getStatistics(StatisticsList list)
ClusteringStrategyIfc
getStatistics
in interface ClusteringStrategyIfc<ConnectionRecord>
public boolean hasCompleteJidsInfo()
OnlineJidsReporter
hasCompleteJidsInfo
in interface OnlineJidsReporter
public void setProperties(Map<String,Object> props)
ClusteringStrategyIfc
Map
which
contains compiles set of defaults overwritten by parameters loaded from configuration file.
setProperties
in interface ClusteringStrategyIfc<ConnectionRecord>
props
- a Map
with all configuration parameters for the class.protected boolean isSuitableForForward(Packet packet)
Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.