Class DefaultAppendOnlyStateRepository<T>

    • Constructor Detail

      • DefaultAppendOnlyStateRepository

        public DefaultAppendOnlyStateRepository​(AppendOnlyTable table,
                                                Class<T> clazz)
        Creates a new DefaultAppendOnlyStateRepository, using the provided table for data storage.
        Parameters:
        table - append-only table used for data storage
        clazz - class representing state values stored in this repository
    • Method Detail

      • fetch

        public T fetch​(String key)
        Description copied from interface: AppendOnlyStateRepository
        Fetches the most recent state value stored under the provided key in this repository.
        Specified by:
        fetch in interface AppendOnlyStateRepository<T>
        Parameters:
        key - key associated with the state value
        Returns:
        object stored under the provided key in this repository
      • insert

        public void insert​(String key,
                           T value)
        Description copied from interface: AppendOnlyStateRepository
        Appends the provided state value, with the provided key, to this repository.
        Specified by:
        insert in interface AppendOnlyStateRepository<T>
        Parameters:
        key - key associated with the state value
        value - state value