Class JDBCFlexibleOfflineMessageRetrievalRepository

  • All Implemented Interfaces:
    tigase.db.DataSourceAware<tigase.db.DataRepository>, tigase.db.MsgRepositoryIfc<tigase.db.DataRepository>, tigase.db.OfflineMsgRepositoryIfc, tigase.db.Repository, tigase.db.util.RepositoryVersionAware

    public class JDBCFlexibleOfflineMessageRetrievalRepository
    extends tigase.server.amp.db.JDBCMsgRepository
    implements tigase.db.util.RepositoryVersionAware
    Author:
    andrzej
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  JDBCFlexibleOfflineMessageRetrievalRepository.MSG_TYPES  
      • Nested classes/interfaces inherited from class tigase.server.amp.db.MsgRepository

        tigase.server.amp.db.MsgRepository.MsgDBItem<T extends java.lang.Object>, tigase.server.amp.db.MsgRepository.MsgRepositoryMDBean, tigase.server.amp.db.MsgRepository.MsgRepositoryPoolBean<T extends java.lang.Object>, tigase.server.amp.db.MsgRepository.OfflineMessagesProcessor
      • Nested classes/interfaces inherited from interface tigase.db.Repository

        tigase.db.Repository.Meta, tigase.db.Repository.SchemaId
      • Nested classes/interfaces inherited from interface tigase.db.util.RepositoryVersionAware

        tigase.db.util.RepositoryVersionAware.SchemaVersion
    • Field Summary

      • Fields inherited from class tigase.server.amp.db.JDBCMsgRepository

        data_repo
      • Fields inherited from class tigase.server.amp.db.MsgRepository

        awaitingInExpiredQueue, earliestOffline, expiredQueue, MAX_QUEUE_SIZE, MSGS_STORE_LIMIT_KEY, OFFLINE_MSGS_KEY, parser
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String convertIdsToString​(java.util.List<java.lang.String> ids)  
      int deleteMessagesToJID​(java.util.List<java.lang.String> db_ids, tigase.xmpp.XMPPResourceConnection session)  
      java.util.Map<java.lang.Enum,​java.lang.Long> getMessagesCount​(tigase.xmpp.jid.JID to)  
      java.util.List<tigase.xml.Element> getMessagesList​(tigase.xmpp.jid.JID to)  
      java.util.Queue<tigase.xml.Element> loadMessagesToJID​(java.util.List<java.lang.String> db_ids, tigase.xmpp.XMPPResourceConnection session, boolean delete, tigase.server.amp.db.MsgRepository.OfflineMessagesProcessor proc)  
      java.util.Queue<tigase.xml.Element> loadMessagesToJID​(tigase.xmpp.XMPPResourceConnection session, boolean delete, tigase.server.amp.db.MsgRepository.OfflineMessagesProcessor proc)  
      void setDataSource​(tigase.db.DataRepository data_repo)  
      boolean storeMessage​(tigase.xmpp.jid.JID from, tigase.xmpp.jid.JID to, java.util.Date expired, tigase.xml.Element msg, tigase.db.NonAuthUserRepository userRepo)  
      • Methods inherited from class tigase.server.amp.db.JDBCMsgRepository

        deleteMessage, initRepository, loadExpiredQueue, loadExpiredQueue, loadMessagesToJID, parseExpiredMessage, parseLoadedMessages
      • Methods inherited from class tigase.server.amp.db.MsgRepository

        getInstance, getMessageExpired, getMsgsStoreLimit, setCondition
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface tigase.db.util.RepositoryVersionAware

        getVersion, updateSchema
    • Constructor Detail

      • JDBCFlexibleOfflineMessageRetrievalRepository

        public JDBCFlexibleOfflineMessageRetrievalRepository()
    • Method Detail

      • setDataSource

        public void setDataSource​(tigase.db.DataRepository data_repo)
        Specified by:
        setDataSource in interface tigase.db.DataSourceAware<tigase.db.DataRepository>
        Overrides:
        setDataSource in class tigase.server.amp.db.JDBCMsgRepository
      • getMessagesCount

        public java.util.Map<java.lang.Enum,​java.lang.Long> getMessagesCount​(tigase.xmpp.jid.JID to)
        Specified by:
        getMessagesCount in interface tigase.db.MsgRepositoryIfc<tigase.db.DataRepository>
        Overrides:
        getMessagesCount in class tigase.server.amp.db.JDBCMsgRepository
      • getMessagesList

        public java.util.List<tigase.xml.Element> getMessagesList​(tigase.xmpp.jid.JID to)
        Specified by:
        getMessagesList in interface tigase.db.MsgRepositoryIfc<tigase.db.DataRepository>
        Overrides:
        getMessagesList in class tigase.server.amp.db.JDBCMsgRepository
      • loadMessagesToJID

        public java.util.Queue<tigase.xml.Element> loadMessagesToJID​(tigase.xmpp.XMPPResourceConnection session,
                                                                     boolean delete,
                                                                     tigase.server.amp.db.MsgRepository.OfflineMessagesProcessor proc)
                                                              throws tigase.db.UserNotFoundException
        Overrides:
        loadMessagesToJID in class tigase.server.amp.db.JDBCMsgRepository
        Throws:
        tigase.db.UserNotFoundException
      • loadMessagesToJID

        public java.util.Queue<tigase.xml.Element> loadMessagesToJID​(java.util.List<java.lang.String> db_ids,
                                                                     tigase.xmpp.XMPPResourceConnection session,
                                                                     boolean delete,
                                                                     tigase.server.amp.db.MsgRepository.OfflineMessagesProcessor proc)
                                                              throws tigase.db.UserNotFoundException
        Specified by:
        loadMessagesToJID in interface tigase.db.MsgRepositoryIfc<tigase.db.DataRepository>
        Overrides:
        loadMessagesToJID in class tigase.server.amp.db.JDBCMsgRepository
        Throws:
        tigase.db.UserNotFoundException
      • deleteMessagesToJID

        public int deleteMessagesToJID​(java.util.List<java.lang.String> db_ids,
                                       tigase.xmpp.XMPPResourceConnection session)
                                throws tigase.db.UserNotFoundException
        Specified by:
        deleteMessagesToJID in interface tigase.db.MsgRepositoryIfc<tigase.db.DataRepository>
        Overrides:
        deleteMessagesToJID in class tigase.server.amp.db.JDBCMsgRepository
        Throws:
        tigase.db.UserNotFoundException
      • storeMessage

        public boolean storeMessage​(tigase.xmpp.jid.JID from,
                                    tigase.xmpp.jid.JID to,
                                    java.util.Date expired,
                                    tigase.xml.Element msg,
                                    tigase.db.NonAuthUserRepository userRepo)
                             throws tigase.db.UserNotFoundException
        Specified by:
        storeMessage in interface tigase.db.OfflineMsgRepositoryIfc
        Overrides:
        storeMessage in class tigase.server.amp.db.JDBCMsgRepository
        Throws:
        tigase.db.UserNotFoundException
      • convertIdsToString

        protected java.lang.String convertIdsToString​(java.util.List<java.lang.String> ids)