public class CachedPubSubRepository extends Object implements IPubSubRepository
| Modifier and Type | Field and Description |
|---|---|
protected PubSubDAO |
dao |
protected Logger |
log |
static long |
MAX_WRITE_DELAY
Field description
|
protected Map<String,Node> |
nodes |
| Constructor and Description |
|---|
CachedPubSubRepository(PubSubDAO dao,
Integer maxCacheSize)
Constructs ...
|
CachedPubSubRepository(PubSubDAO dao,
Integer maxCacheSize,
boolean lazyWrite)
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStats(String name,
tigase.stats.StatisticsList stats)
Method 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 |
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) |
tigase.xmpp.BareJID[] |
getUserRoster(tigase.xmpp.BareJID owner)
Method description
|
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
|
public static final long MAX_WRITE_DELAY
protected final PubSubDAO dao
protected Logger log
public CachedPubSubRepository(PubSubDAO dao, Integer maxCacheSize)
dao - maxCacheSize - public void addStats(String name, tigase.stats.StatisticsList stats)
name - stats - public 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
createNode in interface IPubSubRepositoryserviceJid - nodeName - ownerJid - nodeConfig - nodeType - collection - RepositoryExceptionpublic void deleteNode(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
deleteNode in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic void destroy()
destroy in interface IPubSubRepositorypublic void forgetConfiguration(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
forgetConfiguration in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic Collection<Node> getAllNodes()
public String[] getBuddyGroups(tigase.xmpp.BareJID owner, tigase.xmpp.BareJID bareJid) throws RepositoryException
getBuddyGroups in interface IPubSubRepositoryowner - bareJid - RepositoryExceptionpublic String getBuddySubscription(tigase.xmpp.BareJID owner, tigase.xmpp.BareJID buddy) throws RepositoryException
getBuddySubscription in interface IPubSubRepositoryowner - buddy - RepositoryExceptionprotected Node getNode(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
RepositoryExceptionpublic IAffiliations getNodeAffiliations(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeAffiliations in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic AbstractNodeConfig getNodeConfig(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeConfig in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic IItems getNodeItems(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeItems in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic ISubscriptions getNodeSubscriptions(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeSubscriptions in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic IPubSubDAO getPubSubDAO()
getPubSubDAO in interface IPubSubRepositorypublic String[] getRootCollection(tigase.xmpp.BareJID serviceJid) throws RepositoryException
getRootCollection in interface IPubSubRepositoryserviceJid - RepositoryExceptionprotected Set<String> getRootCollectionSet(tigase.xmpp.BareJID serviceJid) throws RepositoryException
RepositoryExceptionpublic tigase.xmpp.BareJID[] getUserRoster(tigase.xmpp.BareJID owner)
throws RepositoryException
getUserRoster in interface IPubSubRepositoryowner - RepositoryExceptionpublic void init()
init in interface IPubSubRepositorypublic void removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
removeFromRootCollection in interface IPubSubRepositoryserviceJid - nodeName - RepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
AbstractNodeConfig nodeConfig)
throws RepositoryException
update in interface IPubSubRepositoryserviceJid - nodeName - nodeConfig - RepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
IAffiliations nodeAffiliations)
throws RepositoryException
update in interface IPubSubRepositoryserviceJid - nodeName - nodeAffiliations - RepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
ISubscriptions nodeSubscriptions)
throws RepositoryException
update in interface IPubSubRepositoryserviceJid - nodeName - nodeSubscriptions - RepositoryExceptionCopyright © 2008–2014 Tigase. All rights reserved.