Interface IEMessageStore


  • public interface IEMessageStore
    This interface provides EHistoricPublishFeed the ability to persist notification messages and to retrieve those message for a given historic time interval. Notification messages are persisted when an historic publisher publishes a notification message. Notification messages are retrieved when EHistoricPublishFeed receives a request for historic messages.

    Please note that this message store is not only used to persist application notification messages but also PublishStatusEvent messages.

    An IEMessageStore instance may be shared among multiple EHistoricPublishFeeds but the implementation is responsible for maintaining thread-safety.

    When building an EHistoricPublishFeed, a non-null, open message store must be passed to EHistoricPublishFeed.Builder.messageStore(IEMessageStore). Failure to do so results in an exception. The appropriate opening and closing of the IEMessageStore is outside the scope of the historic publish feed and left up to the application. The restriction is that the message store must be opened prior to opening the historic publish feed and closed after closing the historic publish feed.

    It is left up to the implementation to decide how messages are persisted or retrieved.

    Author:
    Charles W. Rapp
    See Also:
    EHistoricPublishFeed, EInterval
    • Method Detail

      • isOpen

        boolean isOpen()
        Returns true if this message store is open and ready to store or retrieve notification messages.
        Returns:
        true if message store is open.
      • retrieve

        Collection<ENotificationMessage> retrieve​(EInterval interval)
        Retrieves historic messages as defined by given date/time interval.
        Parameters:
        interval - date/time interval.
        Returns:
        iterator over historic messages. Does not return null but may return iterator where Iterator.hasNext() returns false.
        Throws:
        NullPointerException - if interval is null.
        IllegalArgumentException - if interval references future time.