Package tigase.pubsub.cluster
Class CachedPubSubRepositoryClustered<T>
java.lang.Object
tigase.pubsub.repository.cached.CachedPubSubRepository<T>
tigase.pubsub.cluster.CachedPubSubRepositoryClustered<T>
- All Implemented Interfaces:
tigase.kernel.beans.Initializable,IPubSubRepositoryClustered<T>,tigase.pubsub.repository.IItems.IListnener,tigase.pubsub.repository.IPubSubRepository,tigase.stats.StatisticHolder,tigase.xmpp.mam.MAMRepository<tigase.pubsub.modules.mam.Query,tigase.xmpp.mam.MAMRepository.Item>
@Bean(name="repository",
parent=PubSubComponentClustered.class,
active=true)
public class CachedPubSubRepositoryClustered<T>
extends tigase.pubsub.repository.cached.CachedPubSubRepository<T>
implements IPubSubRepositoryClustered<T>
- Author:
- andrzej
-
Nested Class Summary
Nested classes/interfaces inherited from class tigase.pubsub.repository.cached.CachedPubSubRepository
tigase.pubsub.repository.cached.CachedPubSubRepository.NodeAffiliationProvider<T extends Object>, tigase.pubsub.repository.cached.CachedPubSubRepository.NodeKey, tigase.pubsub.repository.cached.CachedPubSubRepository.RootCollectionSet, tigase.pubsub.repository.cached.CachedPubSubRepository.SizedCache<V extends Object>Nested classes/interfaces inherited from interface tigase.pubsub.repository.IPubSubRepository
tigase.pubsub.repository.IPubSubRepository.IListener, tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<T extends Object>, tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfcNested classes/interfaces inherited from interface tigase.xmpp.mam.MAMRepository
tigase.xmpp.mam.MAMRepository.Item, tigase.xmpp.mam.MAMRepository.ItemHandler<Q extends tigase.xmpp.mam.Query,I extends tigase.xmpp.mam.MAMRepository.Item> -
Field Summary
Fields inherited from class tigase.pubsub.repository.cached.CachedPubSubRepository
config, dao, nodes, nodesCount, pubSubLogic -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToRootCollection(tigase.xmpp.jid.BareJID serviceJid, String nodeName) voidvoiddeleteNode(tigase.xmpp.jid.BareJID serviceJid, String nodeName) voiddeleteService(tigase.xmpp.jid.BareJID userJid) protected tigase.pubsub.repository.cached.Nodetigase.pubsub.AbstractNodeConfiggetNodeConfig(tigase.xmpp.jid.BareJID serviceJid, String nodeName) tigase.pubsub.repository.cached.NodegetNodeFromCache(tigase.xmpp.jid.BareJID serviceJid, String nodeName) longgetNodesCount(tigase.xmpp.jid.BareJID serviceJID) tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfcgetRootCollectionSet(tigase.xmpp.jid.BareJID serviceJid) voidgetStatistics(String name, tigase.stats.StatisticsList stats) protected booleanisLocalNode(tigase.xmpp.jid.BareJID serviceJid, String nodeName) protected tigase.pubsub.repository.cached.ISubscriptionsCachednewNodeSubscriptions(tigase.xmpp.jid.BareJID serviceJid, String nodeName, T nodeId, tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<Map<tigase.xmpp.jid.BareJID, tigase.pubsub.repository.stateless.UsersSubscription>> subscriptionsSupplier) voidprotected voidnodeCollectionChanged(tigase.xmpp.jid.BareJID serviceJid, String nodeName, String oldCollection, String newCollection) voidnodeRemoved(tigase.xmpp.jid.BareJID serviceJid, String node) voidremoveFromRootCollection(tigase.xmpp.jid.BareJID serviceJid, String nodeName) voidserviceRemoved(tigase.xmpp.jid.BareJID userJid) voidupdate(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.AbstractNodeConfig nodeConfig) voidupdate(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.repository.IAffiliations nodeAffiliations) voidupdate(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.repository.ISubscriptions nodeSubscriptions) voidupdateNodeConfiguration(tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.form.Form config) Methods inherited from class tigase.pubsub.repository.cached.CachedPubSubRepository
addMAMItem, createKey, createNode, createService, destroy, everyHour, everyMinute, everySecond, getChildNodes, getNodeAffiliations, getNodeAndSubnodes, getNodeItems, getNodeItems, getNodeMeta, getNodeSubscriptions, getPubSubDAO, getRootCollection, getServices, getUserAffiliations, getUserRoster, getUserSubscriptions, hasAccessPermission, init, initialize, isServiceAutoCreated, itemDeleted, itemWritten, loadNode, loadRootCollections, newNodeAffiliations, newQuery, queryItems, saveNode, setDao, setStatisticsPrefix, statisticExecutedIn, validateItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.pubsub.repository.IPubSubRepository
addMAMItem, createNode, createService, destroy, getChildNodes, getNodeAffiliations, getNodeItems, getNodeItems, getNodeMeta, getNodeSubscriptions, getPubSubDAO, getRootCollection, getServices, getUserAffiliations, getUserRoster, getUserSubscriptions, initMethods inherited from interface tigase.xmpp.mam.MAMRepository
newQuery, newQuery, queryItems
-
Constructor Details
-
CachedPubSubRepositoryClustered
public CachedPubSubRepositoryClustered()
-
-
Method Details
-
addToRootCollection
public void addToRootCollection(tigase.xmpp.jid.BareJID serviceJid, String nodeName) throws tigase.component.exceptions.RepositoryException - Specified by:
addToRootCollectionin interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
addToRootCollectionin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
removeFromRootCollection
public void removeFromRootCollection(tigase.xmpp.jid.BareJID serviceJid, String nodeName) throws tigase.component.exceptions.RepositoryException - Specified by:
removeFromRootCollectionin interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
removeFromRootCollectionin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
getRootCollectionSet
public tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfc getRootCollectionSet(tigase.xmpp.jid.BareJID serviceJid) throws tigase.component.exceptions.RepositoryException - Specified by:
getRootCollectionSetin interfaceIPubSubRepositoryClustered<T>- Overrides:
getRootCollectionSetin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
updateNodeConfiguration
public void updateNodeConfiguration(tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.form.Form config) - Specified by:
updateNodeConfigurationin interfaceIPubSubRepositoryClustered<T>- Overrides:
updateNodeConfigurationin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>
-
deleteNode
public void deleteNode(tigase.xmpp.jid.BareJID serviceJid, String nodeName) throws tigase.component.exceptions.RepositoryException - Specified by:
deleteNodein interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
deleteNodein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
update
public void update(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.AbstractNodeConfig nodeConfig) throws tigase.component.exceptions.RepositoryException, tigase.pubsub.exceptions.PubSubException - Specified by:
updatein interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
updatein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryExceptiontigase.pubsub.exceptions.PubSubException
-
getNodeFromCache
public tigase.pubsub.repository.cached.Node getNodeFromCache(tigase.xmpp.jid.BareJID serviceJid, String nodeName) - Specified by:
getNodeFromCachein interfaceIPubSubRepositoryClustered<T>- Overrides:
getNodeFromCachein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>
-
getNodeConfig
public tigase.pubsub.AbstractNodeConfig getNodeConfig(tigase.xmpp.jid.BareJID serviceJid, String nodeName) throws tigase.component.exceptions.RepositoryException - Specified by:
getNodeConfigin interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
getNodeConfigin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
clearRemoteNodes
public void clearRemoteNodes()- Specified by:
clearRemoteNodesin interfaceIPubSubRepositoryClustered<T>
-
getNodesCount
public long getNodesCount(tigase.xmpp.jid.BareJID serviceJID) throws tigase.component.exceptions.RepositoryException - Specified by:
getNodesCountin interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
getNodesCountin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
nodeAdded
- Specified by:
nodeAddedin interfaceIPubSubRepositoryClustered<T>
-
nodeRemoved
- Specified by:
nodeRemovedin interfaceIPubSubRepositoryClustered<T>
-
getStatistics
- Specified by:
getStatisticsin interfacetigase.stats.StatisticHolder- Overrides:
getStatisticsin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>
-
deleteService
public void deleteService(tigase.xmpp.jid.BareJID userJid) throws tigase.component.exceptions.RepositoryException - Specified by:
deleteServicein interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
deleteServicein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
update
public void update(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.repository.IAffiliations nodeAffiliations) throws tigase.component.exceptions.RepositoryException - Specified by:
updatein interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
updatein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
update
public void update(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.repository.ISubscriptions nodeSubscriptions) throws tigase.component.exceptions.RepositoryException - Specified by:
updatein interfacetigase.pubsub.repository.IPubSubRepository- Overrides:
updatein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
serviceRemoved
public void serviceRemoved(tigase.xmpp.jid.BareJID userJid) - Specified by:
serviceRemovedin interfaceIPubSubRepositoryClustered<T>- Overrides:
serviceRemovedin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>
-
getNode
protected tigase.pubsub.repository.cached.Node getNode(tigase.xmpp.jid.BareJID serviceJid, String nodeName) throws tigase.component.exceptions.RepositoryException - Overrides:
getNodein classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-
isLocalNode
-
nodeCollectionChanged
protected void nodeCollectionChanged(tigase.xmpp.jid.BareJID serviceJid, String nodeName, String oldCollection, String newCollection) - Overrides:
nodeCollectionChangedin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>
-
newNodeSubscriptions
protected tigase.pubsub.repository.cached.ISubscriptionsCached newNodeSubscriptions(tigase.xmpp.jid.BareJID serviceJid, String nodeName, T nodeId, tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<Map<tigase.xmpp.jid.BareJID, tigase.pubsub.repository.stateless.UsersSubscription>> subscriptionsSupplier) throws tigase.component.exceptions.RepositoryException- Overrides:
newNodeSubscriptionsin classtigase.pubsub.repository.cached.CachedPubSubRepository<T>- Throws:
tigase.component.exceptions.RepositoryException
-