Class CachedPubSubRepositoryClustered<T>

  • All Implemented Interfaces:
    tigase.kernel.beans.Initializable, IPubSubRepositoryClustered<T>, tigase.pubsub.repository.IPubSubRepository, tigase.stats.StatisticHolder, tigase.xmpp.mam.MAMRepository<tigase.pubsub.modules.mam.Query,​tigase.pubsub.repository.IPubSubRepository.Item>

    @Bean(name="pubsubRepository",
          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.NodeKey, tigase.pubsub.repository.cached.CachedPubSubRepository.RootCollectionSet
      • Nested classes/interfaces inherited from interface tigase.pubsub.repository.IPubSubRepository

        tigase.pubsub.repository.IPubSubRepository.Item, tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfc
      • Nested classes/interfaces inherited from interface tigase.xmpp.mam.MAMRepository

        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, logic, MAX_WRITE_DELAY, nodes, nodesCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToRootCollection​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      void clearRemoteNodes()  
      void deleteNode​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      void forgetConfiguration​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      protected tigase.pubsub.repository.cached.Node getNode​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      tigase.pubsub.AbstractNodeConfig getNodeConfig​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      tigase.pubsub.repository.cached.Node getNodeFromCache​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      long getNodesCount​(tigase.xmpp.jid.BareJID serviceJID)  
      tigase.pubsub.repository.IPubSubRepository.RootCollectionSetIfc getRootCollectionSet​(tigase.xmpp.jid.BareJID serviceJid)  
      void getStatistics​(String name, tigase.stats.StatisticsList stats)  
      protected boolean isLocalNode​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      void nodeAdded​(tigase.xmpp.jid.BareJID serviceJid, String node)  
      protected void nodeCollectionChanged​(tigase.xmpp.jid.BareJID serviceJid, String nodeName, String oldCollection, String newCollection)  
      void nodeRemoved​(tigase.xmpp.jid.BareJID serviceJid, String node)  
      void onUserRemoved​(tigase.xmpp.jid.BareJID userJid)  
      void removeFromRootCollection​(tigase.xmpp.jid.BareJID serviceJid, String nodeName)  
      void update​(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.AbstractNodeConfig nodeConfig)  
      void update​(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.repository.IAffiliations nodeAffiliations)  
      void update​(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.pubsub.repository.ISubscriptions nodeSubscriptions)  
      void userRemoved​(tigase.xmpp.jid.BareJID userJid)  
      protected tigase.pubsub.repository.cached.NodeSubscriptions wrapNodeSubscriptions​(tigase.pubsub.repository.NodeSubscriptions nodeSubscriptions)  
      • Methods inherited from class tigase.pubsub.repository.cached.CachedPubSubRepository

        createKey, createNode, destroy, everyHour, everyMinute, everySecond, getAllNodes, getBuddyGroups, getBuddySubscription, getChildNodes, getNodeAffiliations, getNodeAndSubnodes, getNodeItems, getNodeMeta, getNodeSubscriptions, getPubSubDAO, getRootCollection, getUserRoster, getUserSubscriptions, hasAccessPermission, init, initialize, loadRootCollections, newQuery, queryItems, setDao, setStatisticsPrefix, statisticExecutedIn
      • Methods inherited from interface tigase.pubsub.repository.IPubSubRepository

        createNode, destroy, getBuddyGroups, getBuddySubscription, getChildNodes, getNodeAffiliations, getNodeItems, getNodeMeta, getNodeSubscriptions, getPubSubDAO, getRootCollection, 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,
                                        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,
                                             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
      • forgetConfiguration

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

        public void deleteNode​(tigase.xmpp.jid.BareJID serviceJid,
                               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,
                           String nodeName,
                           tigase.pubsub.AbstractNodeConfig nodeConfig)
                    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
      • getNodeFromCache

        public tigase.pubsub.repository.cached.Node getNodeFromCache​(tigase.xmpp.jid.BareJID serviceJid,
                                                                     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,
                                                              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​(String name,
                                  tigase.stats.StatisticsList stats)
        Specified by:
        getStatistics in interface tigase.stats.StatisticHolder
        Overrides:
        getStatistics in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
      • onUserRemoved

        public void onUserRemoved​(tigase.xmpp.jid.BareJID userJid)
                           throws tigase.component.exceptions.RepositoryException
        Specified by:
        onUserRemoved in interface tigase.pubsub.repository.IPubSubRepository
        Overrides:
        onUserRemoved in class tigase.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:
        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,
                           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
      • userRemoved

        public void userRemoved​(tigase.xmpp.jid.BareJID userJid)
        Specified by:
        userRemoved in interface IPubSubRepositoryClustered<T>
        Overrides:
        userRemoved in class tigase.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:
        getNode in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • isLocalNode

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

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

        protected tigase.pubsub.repository.cached.NodeSubscriptions wrapNodeSubscriptions​(tigase.pubsub.repository.NodeSubscriptions nodeSubscriptions)
        Overrides:
        wrapNodeSubscriptions in class tigase.pubsub.repository.cached.CachedPubSubRepository<T>