Interface MessageStore

  • All Known Implementing Classes:
    MemoryMessageStore, NullMessageStore

    public interface MessageStore
    MessageStore defines the interface to a storage area, which can be used to preserve the state of messages.
    • Method Detail

      • getNextMessageId

        long getNextMessageId()
      • getStoreLocation

        java.lang.String getStoreLocation()
      • getStoreLocationAsFile

        java.io.File getStoreLocationAsFile()
      • addEventListener

        void addEventListener​(EventListener eventListener,
                              Event... events)
      • openMessageStore

        void openMessageStore​(ConfiguredObject<?> parent)
        Initializes and opens the message store.
        Parameters:
        parent - parent object
      • upgradeStoreStructure

        void upgradeStoreStructure()
                            throws StoreException
        Requests that the store performs any upgrade work on the store's structure. If there is no upgrade work to be done, this method should return without doing anything.
        Throws:
        StoreException - signals that a problem was encountered trying to upgrade the store. Implementations, on encountering a problem, should endeavour to leave the store in its original state.
      • getInMemorySize

        long getInMemorySize()
      • getBytesEvacuatedFromMemory

        long getBytesEvacuatedFromMemory()
      • resetStatistics

        void resetStatistics()
      • isPersistent

        boolean isPersistent()
        Is this store capable of persisting the data
        Returns:
        true if this store is capable of persisting data
      • closeMessageStore

        void closeMessageStore()
        Called to close and cleanup any resources used by the message store.