Class MsgRepository<T,​S extends DataSource>

    • Field Detail

      • OFFLINE_MSGS_KEY

        public static final java.lang.String OFFLINE_MSGS_KEY
        See Also:
        Constant Field Values
      • MSGS_STORE_LIMIT_KEY

        public static final java.lang.String MSGS_STORE_LIMIT_KEY
        See Also:
        Constant Field Values
      • awaitingInExpiredQueue

        protected java.util.concurrent.atomic.AtomicInteger awaitingInExpiredQueue
      • earliestOffline

        protected long earliestOffline
    • Constructor Detail

      • MsgRepository

        public MsgRepository()
    • Method Detail

      • initRepository

        @Deprecated
        public void initRepository​(java.lang.String conn_str,
                                   java.util.Map<java.lang.String,​java.lang.String> map)
                            throws DBInitException
        Deprecated.
        Description copied from interface: Repository
        Method is deprecated and should not be user any more.
        The method is called to initialize the data repository. Depending on the implementation all the initialization parameters can be passed either via resource_uri parameter as the database connection string or via params map if the required repository parameters are more complex or both.
        Specified by:
        initRepository in interface Repository
        Parameters:
        conn_str - value in most cases representing the database connection string.
        map - is a Map with repository properties necessary to initialize and perform all the functions. The initialization parameters are implementation dependent.
        Throws:
        DBInitException - if there was an error during repository initialization. Some implementations, though, perform so called lazy initialization so even though there is a problem with the underlying repository it may not be signaled through this method call.
      • getMessageExpired

        @Deprecated
        public Element getMessageExpired​(long time,
                                         boolean delete)
        Deprecated.
        Description copied from interface: OfflineMsgRepositoryIfc
        Loads head of the payloads queue which holds items that would be expired after stated time with an option to delete them from repository after being retrieved. This is blocking method, which means if there is not data to return, implementation should block the call until data is available.
        Specified by:
        getMessageExpired in interface OfflineMsgRepositoryIfc
        Parameters:
        time - time in milliseconds representing time after which given message would be considered as expired
        delete - boolean parameter controlling whether messages should be removed from repository after they retrieved.
        Returns:
        head of the payloads queue which holds items that would be expired after stated time with an option to delete them from repository after being retrieved.
      • setCondition

        @Deprecated
        public void setCondition​(java.util.concurrent.locks.ReentrantLock lock,
                                 java.util.concurrent.locks.Condition condition)
        Deprecated.
        Specified by:
        setCondition in interface MsgRepositoryIfc<T>
      • loadExpiredQueue

        @Deprecated
        protected abstract void loadExpiredQueue​(int max)
        Deprecated.
      • loadExpiredQueue

        @Deprecated
        protected abstract void loadExpiredQueue​(java.util.Date expired)
        Deprecated.
      • deleteMessage

        protected abstract void deleteMessage​(T db_id)