Interface AppendOnlyStateRepository<T>

  • Type Parameters:
    T - type of the state object stored in this repository
    All Known Implementing Classes:
    DefaultAppendOnlyStateRepository

    public interface AppendOnlyStateRepository<T>
    An append-only repository for the connector state.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T fetch​(String key)
      Fetches the most recent state value stored under the provided key in this repository.
      void insert​(String key, T value)
      Appends the provided state value, with the provided key, to this repository.
    • Method Detail

      • fetch

        T fetch​(String key)
        Fetches the most recent state value stored under the provided key in this repository.
        Parameters:
        key - key associated with the state value
        Returns:
        object stored under the provided key in this repository
        Throws:
        KeyNotFoundException - if no object under provided key exists in this repository
      • insert

        void insert​(String key,
                    T value)
        Appends the provided state value, with the provided key, to this repository.
        Parameters:
        key - key associated with the state value
        value - state value