public class CacheContenerV2 extends Object implements tigase.sys.OnlineJidsReporter, CacheContenerIfc
| Constructor and Description |
|---|
CacheContenerV2() |
| Modifier and Type | Method and Description |
|---|---|
int |
connectionsSize()
Returns number of all cached connections (all/total CIDs for all connected
users)
|
boolean |
containsJid(tigase.xmpp.BareJID jid) |
boolean |
containsJidLocally(tigase.xmpp.BareJID jid) |
boolean |
containsJidLocally(tigase.xmpp.JID jid) |
tigase.xmpp.JID[] |
getConnectionIdsForJid(tigase.xmpp.BareJID jid) |
ConnectionRecordExt |
getConnectionRecord(tigase.xmpp.JID jid)
Retrieves a
ConnectionRecordExt for the particular, specific
JID |
Set<ConnectionRecordExt> |
getConnectionRecords(tigase.xmpp.BareJID bareJID)
Method retrieves all
ConnectionRecordExt records for the particular
BareJID |
Object |
getInternalData()
Method allows retrieval internal structure underlying cache.
|
List<tigase.xmpp.JID> |
getNodesForJid(tigase.xmpp.JID jid)
Method retrieves all nodes on which particular user has it's connections.
|
boolean |
hasCompleteJidsInfo() |
int |
mapSize()
Return number of connected users
|
boolean |
needsSync()
Allow obtaining information whether cache needs synching with other nodes.
|
void |
removeAllForNode(tigase.xmpp.JID node)
Method removes all cached connections which were related to the given node
(e.g.
|
void |
setSync(boolean sync)
Set the state of synchronisation.
|
void |
updatePresence(tigase.xml.Element presence,
ConnectionRecordExt rec)
Method updates given connection in the cache with the information about
presence for the given connection.
|
void |
userDisconnected(ConnectionRecordExt rec)
Method responsible for user disconnection events.
|
void |
usersConnected(ConnectionRecordExt... recs)
Method responsible for user connection events.
|
public int connectionsSize()
public boolean containsJid(tigase.xmpp.BareJID jid)
containsJid in interface CacheContenerIfccontainsJid in interface tigase.sys.OnlineJidsReporterpublic boolean containsJidLocally(tigase.xmpp.BareJID jid)
containsJidLocally in interface tigase.sys.OnlineJidsReporterpublic boolean containsJidLocally(tigase.xmpp.JID jid)
containsJidLocally in interface tigase.sys.OnlineJidsReporterpublic int mapSize()
public boolean needsSync()
true if cache is out of synch, false otherwise.public void setSync(boolean sync)
setSync in interface CacheContenerIfcsync - boolean value denoting sync state.public void removeAllForNode(tigase.xmpp.JID node)
removeAllForNode in interface CacheContenerIfcnode - JID of the node for which cached items will be removed.public void updatePresence(tigase.xml.Element presence,
ConnectionRecordExt rec)
presence - Element containing presence informationrec - ConnectionRecordExt for which presence should be
updatedpublic void userDisconnected(ConnectionRecordExt rec)
userDisconnected in interface CacheContenerIfcrec - ConnectionRecordExt for which presence should be updatedpublic void usersConnected(ConnectionRecordExt... recs)
usersConnected in interface CacheContenerIfcrecs - ConnectionRecordExt for which presence should be
updatedpublic tigase.xmpp.JID[] getConnectionIdsForJid(tigase.xmpp.BareJID jid)
getConnectionIdsForJid in interface tigase.sys.OnlineJidsReporterpublic ConnectionRecordExt getConnectionRecord(tigase.xmpp.JID jid)
ConnectionRecordExt for the particular, specific
JIDgetConnectionRecord in interface CacheContenerIfcjid - for which ConnectionRecordExt should be retrievedConnectionRecordExt for the given JIDpublic Set<ConnectionRecordExt> getConnectionRecords(tigase.xmpp.BareJID bareJID)
ConnectionRecordExt records for the particular
BareJIDbareJID - for which all ConnectionRecordExt should be
retrievedSet containing all ConnectionRecordExt objects for
the given JIDpublic Object getInternalData()
Object with internal structure of underlying cache.public List<tigase.xmpp.JID> getNodesForJid(tigase.xmpp.JID jid)
jid - for which list of cluster nodes should be returned.public boolean hasCompleteJidsInfo()
hasCompleteJidsInfo in interface tigase.sys.OnlineJidsReporterCopyright © 2015 Tigase. All rights reserved.