public class CachedPubSubRepository<T> extends Object implements IPubSubRepository, tigase.stats.StatisticHolder
| Modifier and Type | Class and Description |
|---|---|
static class |
CachedPubSubRepository.RootCollectionSet |
| 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 |
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 |
everyHour() |
void |
everyMinute() |
void |
everySecond() |
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
|
INodeMeta |
getNodeMeta(tigase.xmpp.BareJID serviceJid,
String nodeName) |
ISubscriptions |
getNodeSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
IPubSubDAO |
getPubSubDAO()
Method description
|
String[] |
getRootCollection(tigase.xmpp.BareJID serviceJid)
Method description
|
protected CachedPubSubRepository.RootCollectionSet |
getRootCollectionSet(tigase.xmpp.BareJID serviceJid) |
void |
getStatistics(String name,
tigase.stats.StatisticsList stats) |
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
|
protected void |
loadRootCollections(CachedPubSubRepository.RootCollectionSet rootCollection) |
void |
onUserRemoved(tigase.xmpp.BareJID userJid) |
void |
removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
void |
setDelayedRootCollectionLoading(boolean delayedRootCollectionLoading) |
void |
setStatisticsPrefix(String prefix) |
void |
statisticExecutedIn(long executionTime) |
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 void |
userRemoved(tigase.xmpp.BareJID userJid) |
protected NodeSubscriptions |
wrapNodeSubscriptions(NodeSubscriptions nodeSubscriptions) |
public static final long MAX_WRITE_DELAY
protected final IPubSubDAO<T> dao
protected Logger log
public void getStatistics(String name, tigase.stats.StatisticsList stats)
getStatistics in interface tigase.stats.StatisticHolderpublic void statisticExecutedIn(long executionTime)
statisticExecutedIn in interface tigase.stats.StatisticHolderpublic void everyHour()
everyHour in interface tigase.stats.StatisticHolderpublic void everyMinute()
everyMinute in interface tigase.stats.StatisticHolderpublic void everySecond()
everySecond in interface tigase.stats.StatisticHolderpublic void setStatisticsPrefix(String prefix)
setStatisticsPrefix in interface tigase.stats.StatisticHolderpublic void addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
addToRootCollection in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic 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 INodeMeta getNodeMeta(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeMeta 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 CachedPubSubRepository.RootCollectionSet getRootCollectionSet(tigase.xmpp.BareJID serviceJid) throws RepositoryException
RepositoryExceptionprotected void loadRootCollections(CachedPubSubRepository.RootCollectionSet rootCollection) 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 setDelayedRootCollectionLoading(boolean delayedRootCollectionLoading)
setDelayedRootCollectionLoading in interface IPubSubRepositorypublic 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 IPubSubRepositoryRepositoryExceptionpublic void onUserRemoved(tigase.xmpp.BareJID userJid)
throws RepositoryException
onUserRemoved in interface IPubSubRepositoryRepositoryExceptionprotected void userRemoved(tigase.xmpp.BareJID userJid)
Copyright © 2008–2017 Tigase. All rights reserved.