Class 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 java.lang.Object>, tigase.pubsub.repository.cached.CachedPubSubRepository.NodeKey, tigase.pubsub.repository.cached.CachedPubSubRepository.RootCollectionSet, tigase.pubsub.repository.cached.CachedPubSubRepository.SizedCache<V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface tigase.pubsub.repository.IPubSubRepository

        tigase.pubsub.repository.IPubSubRepository.IListener, tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<T extends java.lang.Object>, tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfc
      • Nested 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToRootCollection​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      void clearRemoteNodes()  
      void deleteNode​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      void deleteService​(tigase.xmpp.jid.BareJID userJid)  
      protected tigase.pubsub.repository.cached.Node getNode​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      tigase.pubsub.AbstractNodeConfig getNodeConfig​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      tigase.pubsub.repository.cached.Node getNodeFromCache​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      long getNodesCount​(tigase.xmpp.jid.BareJID serviceJID)  
      tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfc getRootCollectionSet​(tigase.xmpp.jid.BareJID serviceJid)  
      void getStatistics​(java.lang.String name, tigase.stats.StatisticsList stats)  
      protected boolean isLocalNode​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      protected tigase.pubsub.repository.cached.ISubscriptionsCached newNodeSubscriptions​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName, T nodeId, tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<java.util.Map<tigase.xmpp.jid.BareJID,​tigase.pubsub.repository.stateless.UsersSubscription>> subscriptionsSupplier)  
      void nodeAdded​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String node)  
      protected void nodeCollectionChanged​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName, java.lang.String oldCollection, java.lang.String newCollection)  
      void nodeRemoved​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String node)  
      void removeFromRootCollection​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      void serviceRemoved​(tigase.xmpp.jid.BareJID userJid)  
      void update​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName, tigase.pubsub.AbstractNodeConfig nodeConfig)  
      void update​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName, tigase.pubsub.repository.IAffiliations nodeAffiliations)  
      void update​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName, tigase.pubsub.repository.ISubscriptions nodeSubscriptions)  
      void updateNodeConfiguration​(tigase.xmpp.jid.BareJID serviceJID, java.lang.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, validateItem
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface tigase.pubsub.repository.IPubSubRepository

        addMAMItem, createNode, createService, destroy, getChildNodes, getNodeAffiliations, getNodeItems, getNodeItems, getNodeMeta, getNodeSubscriptions, getPubSubDAO, getRootCollection, getServices, getUserAffiliations, getUserRoster, getUserSubscriptions, init
      • Methods inherited from interface tigase.xmpp.mam.MAMRepository

        newQuery, queryItems
    • Constructor Detail

      • CachedPubSubRepositoryClustered

        public CachedPubSubRepositoryClustered()
    • Method Detail

      • addToRootCollection

        public void addToRootCollection​(tigase.xmpp.jid.BareJID serviceJid,
                                        java.lang.String nodeName)
                                 throws tigase.component.exceptions.RepositoryException
        Specified by:
        addToRootCollection in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        addToRootCollection in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • removeFromRootCollection

        public void removeFromRootCollection​(tigase.xmpp.jid.BareJID serviceJid,
                                             java.lang.String nodeName)
                                      throws tigase.component.exceptions.RepositoryException
        Specified by:
        removeFromRootCollection in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        removeFromRootCollection in class tigase.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:
        getRootCollectionSet in interface IPubSubRepositoryClustered<T>
        Overrides:
        getRootCollectionSet in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • updateNodeConfiguration

        public void updateNodeConfiguration​(tigase.xmpp.jid.BareJID serviceJID,
                                            java.lang.String nodeName,
                                            tigase.form.Form config)
        Specified by:
        updateNodeConfiguration in interface IPubSubRepositoryClustered<T>
        Overrides:
        updateNodeConfiguration in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
      • deleteNode

        public void deleteNode​(tigase.xmpp.jid.BareJID serviceJid,
                               java.lang.String nodeName)
                        throws tigase.component.exceptions.RepositoryException
        Specified by:
        deleteNode in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        deleteNode in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • update

        public void update​(tigase.xmpp.jid.BareJID serviceJid,
                           java.lang.String nodeName,
                           tigase.pubsub.AbstractNodeConfig nodeConfig)
                    throws tigase.component.exceptions.RepositoryException,
                           tigase.pubsub.exceptions.PubSubException
        Specified by:
        update in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        update in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
        tigase.pubsub.exceptions.PubSubException
      • getNodeFromCache

        public tigase.pubsub.repository.cached.Node getNodeFromCache​(tigase.xmpp.jid.BareJID serviceJid,
                                                                     java.lang.String nodeName)
        Specified by:
        getNodeFromCache in interface IPubSubRepositoryClustered<T>
        Overrides:
        getNodeFromCache in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
      • getNodeConfig

        public tigase.pubsub.AbstractNodeConfig getNodeConfig​(tigase.xmpp.jid.BareJID serviceJid,
                                                              java.lang.String nodeName)
                                                       throws tigase.component.exceptions.RepositoryException
        Specified by:
        getNodeConfig in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        getNodeConfig in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • getNodesCount

        public long getNodesCount​(tigase.xmpp.jid.BareJID serviceJID)
                           throws tigase.component.exceptions.RepositoryException
        Specified by:
        getNodesCount in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        getNodesCount in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • getStatistics

        public void getStatistics​(java.lang.String name,
                                  tigase.stats.StatisticsList stats)
        Specified by:
        getStatistics in interface tigase.stats.StatisticHolder
        Overrides:
        getStatistics in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
      • deleteService

        public void deleteService​(tigase.xmpp.jid.BareJID userJid)
                           throws tigase.component.exceptions.RepositoryException
        Specified by:
        deleteService in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        deleteService in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • update

        public void update​(tigase.xmpp.jid.BareJID serviceJid,
                           java.lang.String nodeName,
                           tigase.pubsub.repository.IAffiliations nodeAffiliations)
                    throws tigase.component.exceptions.RepositoryException
        Specified by:
        update in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        update in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • update

        public void update​(tigase.xmpp.jid.BareJID serviceJid,
                           java.lang.String nodeName,
                           tigase.pubsub.repository.ISubscriptions nodeSubscriptions)
                    throws tigase.component.exceptions.RepositoryException
        Specified by:
        update in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        update in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • serviceRemoved

        public void serviceRemoved​(tigase.xmpp.jid.BareJID userJid)
        Specified by:
        serviceRemoved in interface IPubSubRepositoryClustered<T>
        Overrides:
        serviceRemoved in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
      • getNode

        protected tigase.pubsub.repository.cached.Node getNode​(tigase.xmpp.jid.BareJID serviceJid,
                                                               java.lang.String nodeName)
                                                        throws tigase.component.exceptions.RepositoryException
        Overrides:
        getNode in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • isLocalNode

        protected boolean isLocalNode​(tigase.xmpp.jid.BareJID serviceJid,
                                      java.lang.String nodeName)
      • nodeCollectionChanged

        protected void nodeCollectionChanged​(tigase.xmpp.jid.BareJID serviceJid,
                                             java.lang.String nodeName,
                                             java.lang.String oldCollection,
                                             java.lang.String newCollection)
        Overrides:
        nodeCollectionChanged in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
      • newNodeSubscriptions

        protected tigase.pubsub.repository.cached.ISubscriptionsCached newNodeSubscriptions​(tigase.xmpp.jid.BareJID serviceJid,
                                                                                            java.lang.String nodeName,
                                                                                            T nodeId,
                                                                                            tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<java.util.Map<tigase.xmpp.jid.BareJID,​tigase.pubsub.repository.stateless.UsersSubscription>> subscriptionsSupplier)
                                                                                     throws tigase.component.exceptions.RepositoryException
        Overrides:
        newNodeSubscriptions in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException