Interface ReliableMessagingStore<T extends Serializable>

Type Parameters:
T - the generic type of the objects to be stored

public interface ReliableMessagingStore<T extends Serializable>
Store to persists reliable messaging sequences and messages.
Since:
1.6
  • Method Summary

    Modifier and Type
    Method
    Description
    Remove the object with the given key
    * Retrieve the object stored under the given key
     
    void
    store(String key, T value)
    Store the given Object.
    void
    update(String key, T value)
    Updates the given Object on the given key
  • Method Details

    • store

      void store(String key, T value) throws Exception
      Store the given Object.
      Parameters:
      key - the identifier for value
      value - the Object to store with key
      Throws:
      ReliableMessagingStoreException - if the given key cannot be stored or is null or if an attempt is made to store an object for a key that already has an object associated or if the store is not available or any other implementation-specific error occurred.
      Exception
    • update

      void update(String key, T value) throws Exception
      Updates the given Object on the given key
      Parameters:
      key - the identifier for value
      value - the Object to store with key
      Throws:
      ReliableMessagingStoreException - if the given Object cannot be updated or if the store is not available if no value for the given key was previously stored or any other implementation-specific error occurred.
      Exception
    • retrieve

      T retrieve(String key) throws Exception
      * Retrieve the object stored under the given key
      Parameters:
      key - the identifier of the object to retrieve.
      Returns:
      the object associated with the given key. If no object for the given key was found this returns null.
      Throws:
      ReliableMessagingStoreException - if the given key is null or if the store is not available or any other implementation-specific error occurred.
      Exception
    • remove

      T remove(String key) throws Exception
      Remove the object with the given key
      Parameters:
      key - the identifier of the object to remove.
      Returns:
      the object that was previously stored for the given key
      Throws:
      ReliableMessagingStoreException - if the given key is null or if no value for the given key was previously stored or if the store is not available or any other implementation-specific error occurred.
      Exception
    • retrieveAll

      Map<String,T> retrieveAll() throws Exception
      Returns:
      All the key-value pairs that this object store currently holds.
      Throws:
      ReliableMessagingStoreException - if an exception occurred while collecting the values.
      Exception