public class CachedPubSubRepository<T> extends Object implements IPubSubRepository
| Modifier and Type | Field and Description |
|---|---|
protected IPubSubDAO<T> |
dao |
protected Logger |
log |
static long |
MAX_WRITE_DELAY
Field description
|
protected Map<String,Node> |
nodes |
| Constructor and Description |
|---|
CachedPubSubRepository(PubSubDAO dao,
Integer maxCacheSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStats(String name,
tigase.stats.StatisticsList stats) |
void |
addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
protected String |
createKey(tigase.xmpp.BareJID serviceJid,
String nodeName) |
void |
createNode(tigase.xmpp.BareJID serviceJid,
String nodeName,
tigase.xmpp.BareJID ownerJid,
AbstractNodeConfig nodeConfig,
NodeType nodeType,
String collection)
Method description
|
void |
deleteNode(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
void |
destroy()
Method description
|
void |
forgetConfiguration(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
Collection<Node> |
getAllNodes() |
String[] |
getBuddyGroups(tigase.xmpp.BareJID owner,
tigase.xmpp.BareJID bareJid)
Method description
|
String |
getBuddySubscription(tigase.xmpp.BareJID owner,
tigase.xmpp.BareJID buddy)
Method description
|
protected Node |
getNode(tigase.xmpp.BareJID serviceJid,
String nodeName) |
IAffiliations |
getNodeAffiliations(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
AbstractNodeConfig |
getNodeConfig(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
IItems |
getNodeItems(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
ISubscriptions |
getNodeSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
IPubSubDAO |
getPubSubDAO()
Method description
|
String[] |
getRootCollection(tigase.xmpp.BareJID serviceJid)
Method description
|
protected Set<String> |
getRootCollectionSet(tigase.xmpp.BareJID serviceJid) |
Map<tigase.xmpp.BareJID,tigase.xmpp.impl.roster.RosterElement> |
getUserRoster(tigase.xmpp.BareJID owner)
Method description
|
Map<String,UsersSubscription> |
getUserSubscriptions(tigase.xmpp.BareJID serviceJid,
tigase.xmpp.BareJID userJid) |
void |
init()
Method description
|
void |
removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
void |
update(tigase.xmpp.BareJID serviceJid,
String nodeName,
AbstractNodeConfig nodeConfig)
Method description
|
void |
update(tigase.xmpp.BareJID serviceJid,
String nodeName,
IAffiliations nodeAffiliations)
Method description
|
void |
update(tigase.xmpp.BareJID serviceJid,
String nodeName,
ISubscriptions nodeSubscriptions)
Method description
|
protected NodeSubscriptions |
wrapNodeSubscriptions(NodeSubscriptions nodeSubscriptions) |
public static final long MAX_WRITE_DELAY
protected final IPubSubDAO<T> dao
protected Logger log
public void addStats(String name, tigase.stats.StatisticsList stats)
public void addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
IPubSubRepositoryaddToRootCollection in interface IPubSubRepositoryRepositoryExceptionpublic void createNode(tigase.xmpp.BareJID serviceJid,
String nodeName,
tigase.xmpp.BareJID ownerJid,
AbstractNodeConfig nodeConfig,
NodeType nodeType,
String collection)
throws RepositoryException
IPubSubRepositorycreateNode in interface IPubSubRepositoryRepositoryExceptionprotected NodeSubscriptions wrapNodeSubscriptions(NodeSubscriptions nodeSubscriptions)
public void deleteNode(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
IPubSubRepositorydeleteNode in interface IPubSubRepositoryRepositoryExceptionpublic void destroy()
IPubSubRepositorydestroy in interface IPubSubRepositorypublic void forgetConfiguration(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
IPubSubRepositoryforgetConfiguration in interface IPubSubRepositoryRepositoryExceptionpublic Collection<Node> getAllNodes()
public String[] getBuddyGroups(tigase.xmpp.BareJID owner, tigase.xmpp.BareJID bareJid) throws RepositoryException
IPubSubRepositorygetBuddyGroups in interface IPubSubRepositoryRepositoryExceptionpublic String getBuddySubscription(tigase.xmpp.BareJID owner, tigase.xmpp.BareJID buddy) throws RepositoryException
IPubSubRepositorygetBuddySubscription in interface IPubSubRepositoryRepositoryExceptionprotected Node getNode(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
RepositoryExceptionpublic IAffiliations getNodeAffiliations(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
IPubSubRepositorygetNodeAffiliations in interface IPubSubRepositoryRepositoryExceptionpublic AbstractNodeConfig getNodeConfig(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
IPubSubRepositorygetNodeConfig in interface IPubSubRepositoryRepositoryExceptionpublic IItems getNodeItems(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
IPubSubRepositorygetNodeItems in interface IPubSubRepositoryRepositoryExceptionpublic ISubscriptions getNodeSubscriptions(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
IPubSubRepositorygetNodeSubscriptions in interface IPubSubRepositoryRepositoryExceptionpublic IPubSubDAO getPubSubDAO()
IPubSubRepositorygetPubSubDAO in interface IPubSubRepositorypublic String[] getRootCollection(tigase.xmpp.BareJID serviceJid) throws RepositoryException
IPubSubRepositorygetRootCollection in interface IPubSubRepositoryRepositoryExceptionprotected Set<String> getRootCollectionSet(tigase.xmpp.BareJID serviceJid) throws RepositoryException
RepositoryExceptionpublic Map<tigase.xmpp.BareJID,tigase.xmpp.impl.roster.RosterElement> getUserRoster(tigase.xmpp.BareJID owner) throws RepositoryException
IPubSubRepositorygetUserRoster in interface IPubSubRepositoryRepositoryExceptionpublic Map<String,UsersSubscription> getUserSubscriptions(tigase.xmpp.BareJID serviceJid, tigase.xmpp.BareJID userJid) throws RepositoryException
getUserSubscriptions in interface IPubSubRepositoryRepositoryExceptionpublic void init()
IPubSubRepositoryinit in interface IPubSubRepositorypublic void removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
IPubSubRepositoryremoveFromRootCollection in interface IPubSubRepositoryRepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
AbstractNodeConfig nodeConfig)
throws RepositoryException
IPubSubRepositoryupdate in interface IPubSubRepositoryRepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
IAffiliations nodeAffiliations)
throws RepositoryException
IPubSubRepositoryupdate in interface IPubSubRepositoryRepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
ISubscriptions nodeSubscriptions)
throws RepositoryException
IPubSubRepositoryupdate in interface IPubSubRepositoryRepositoryExceptionCopyright © 2008–2015 Tigase. All rights reserved.