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.
|
Object |
getInternalCacheData()
Deprecated.
|
List<JID> |
getNodesConnected()
The method returns all cluster nodes currently connected to the cluster node.
|
List<JID> |
getNodesForJid(JID jid)
Method description
|
List<JID> |
getNodesForPacketForward(JID fromNode,
Set<JID> visitedNodes,
Packet packet)
Method description
|
List<JID> |
getNodesForUserConnect(JID jid)
Method description
|
List<JID> |
getNodesForUserDisconnect(JID jid)
Method description
|
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)
Method description
|
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.
|
void |
setSessionManagerHandler(SessionManagerClusteredIfc sm)
Method description
|
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.@Deprecated public Object getInternalCacheData()
ClusteringStrategyIfc
getInternalCacheData
in interface ClusteringStrategyIfc<ConnectionRecord>
public List<JID> getNodesForPacketForward(JID fromNode, Set<JID> visitedNodes, Packet packet)
fromNode
- visitedNodes
- packet
- public List<JID> getNodesForUserConnect(JID jid)
jid
- public List<JID> getNodesForUserDisconnect(JID jid)
jid
- 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.
If he implementation took a good care of providing defaults for all
parameters no parameter should be missing.setProperties
in interface ClusteringStrategyIfc<ConnectionRecord>
props
- a Map
with all configuration parameters for the
class.public void setSessionManagerHandler(SessionManagerClusteredIfc sm)
setSessionManagerHandler
in interface ClusteringStrategyIfc<ConnectionRecord>
sm
- protected boolean isSuitableForForward(Packet packet)
packet
- Copyright © 2017 "Tigase, Inc.". All rights reserved.