Class JDBCFlexibleOfflineMessageRetrievalRepository

java.lang.Object
tigase.server.amp.db.MsgRepository<Long,tigase.db.DataRepository>
tigase.server.amp.db.JDBCMsgRepository
tigase.archive.unified.db.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 enum 
     

    Nested classes/interfaces inherited from class tigase.server.amp.db.MsgRepository

    tigase.server.amp.db.MsgRepository.MsgDBItem<T extends Object>, tigase.server.amp.db.MsgRepository.MsgRepositoryMDBean, tigase.server.amp.db.MsgRepository.MsgRepositoryPoolBean<T extends 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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
     
    int
    deleteMessagesToJID(List<String> db_ids, tigase.xmpp.XMPPResourceConnection session)
     
    getMessagesCount(tigase.xmpp.jid.JID to)
     
    List<tigase.xml.Element>
    getMessagesList(tigase.xmpp.jid.JID to)
     
    Queue<tigase.xml.Element>
    loadMessagesToJID(List<String> db_ids, tigase.xmpp.XMPPResourceConnection session, boolean delete, tigase.server.amp.db.MsgRepository.OfflineMessagesProcessor proc)
     
    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, 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 Details

    • JDBCFlexibleOfflineMessageRetrievalRepository

      public JDBCFlexibleOfflineMessageRetrievalRepository()
  • Method Details

    • 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 Map<Enum,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 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 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 Queue<tigase.xml.Element> loadMessagesToJID(List<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(List<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, 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 String convertIdsToString(List<String> ids)