public class ShardingStrategy extends AbstractStrategy implements StrategyIfc, tigase.muc.Room.RoomOccupantListener, InMemoryMucRepositoryClustered.RoomListener
cl_controller, localNodeJid, muc, mucRepository, REQUEST_SYNC_CMD| Constructor and Description |
|---|
ShardingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid,
String nickname) |
protected tigase.xmpp.JID |
getNodeForRoom(tigase.xmpp.BareJID roomJid) |
void |
nodeDisconnected(tigase.xmpp.JID nodeJid)
Method description
|
void |
onLeaveRoom(tigase.muc.Room room) |
void |
onOccupantChangedPresence(tigase.muc.Room room,
tigase.xmpp.JID occupantJid,
String nickname,
tigase.xml.Element presence,
boolean newOccupant) |
void |
onRoomCreated(tigase.muc.Room room) |
void |
onRoomDestroyed(tigase.muc.Room room,
tigase.xml.Element destroyElement) |
boolean |
processPacket(tigase.server.Packet packet)
Method called when packet is received by component to preprocess packet
before/instead of passing it back to non clustered component
|
protected boolean |
removeOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid) |
void |
setClusterController(tigase.cluster.api.ClusterControllerIfc cl_controller)
Setter used to set instance of cluster controller
|
void |
setMucRepository(InMemoryMucRepositoryClustered mucRepository)
Setter to pass instance of InMemoryMucRepositoryClustered
|
void |
start()
Method called when component is started
|
void |
stop()
Method called when component is stopped
|
forwardPacketToNode, getNodesConnected, getNodesConnectedWithLocal, nodeConnected, onOccupantAdded, onOccupantRemoved, requestSync, sendRemoteOccupantRemovalOnDisconnect, sendRemovalFromRoomOnNodeDisconnect, setLocalNodeJid, setMucComponentClusteredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNodesConnected, getNodesConnectedWithLocal, nodeConnected, setMucComponentClusteredpublic void nodeDisconnected(tigase.xmpp.JID nodeJid)
nodeDisconnected in interface StrategyIfcnodeJid - is a JIDpublic void setClusterController(tigase.cluster.api.ClusterControllerIfc cl_controller)
StrategyIfcsetClusterController in interface StrategyIfcsetClusterController in class AbstractStrategypublic boolean processPacket(tigase.server.Packet packet)
StrategyIfcprocessPacket in interface StrategyIfcprotected tigase.xmpp.JID getNodeForRoom(tigase.xmpp.BareJID roomJid)
public void setMucRepository(InMemoryMucRepositoryClustered mucRepository)
StrategyIfcsetMucRepository in interface StrategyIfcsetMucRepository in class AbstractStrategypublic void start()
StrategyIfcstart in interface StrategyIfcpublic void stop()
StrategyIfcstop in interface StrategyIfcpublic void onLeaveRoom(tigase.muc.Room room)
onLeaveRoom in interface InMemoryMucRepositoryClustered.RoomListenerpublic void onRoomCreated(tigase.muc.Room room)
onRoomCreated in interface InMemoryMucRepositoryClustered.RoomListenerpublic void onRoomDestroyed(tigase.muc.Room room,
tigase.xml.Element destroyElement)
onRoomDestroyed in interface InMemoryMucRepositoryClustered.RoomListenerpublic void onOccupantChangedPresence(tigase.muc.Room room,
tigase.xmpp.JID occupantJid,
String nickname,
tigase.xml.Element presence,
boolean newOccupant)
onOccupantChangedPresence in interface tigase.muc.Room.RoomOccupantListenerprotected boolean addOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid,
String nickname)
addOccupant in class AbstractStrategyprotected boolean removeOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid)
removeOccupant in class AbstractStrategyCopyright © 2017 Tigase. All rights reserved.