Interface DataStore<T>

Type Parameters:
T - type of store items
All Superinterfaces:
MultiEntryStore<T>
All Known Subinterfaces:
ConfigurationEntryStore<V>

public interface DataStore<T> extends MultiEntryStore<T>
A DataStore can be used to store any structured data. Note: the default implementation use JAXB to marshall the items.
Since:
1.23
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a map of all stored items.
    void
    put(String id, T item)
    Put the item with the given id to the store.
    put(T item)
    Put a item with automatically generated id to the store.

    Methods inherited from interface sonia.scm.store.MultiEntryStore

    clear, get, getOptional, remove
  • Method Details

    • put

      String put(T item)
      Put a item with automatically generated id to the store.
      Parameters:
      item - item to store
      Returns:
      automatically generated id of the item
    • put

      void put(String id, T item)
      Put the item with the given id to the store.
      Parameters:
      id - id of the item
      item - item to store
    • getAll

      Map<String,T> getAll()
      Returns a map of all stored items. The key of the map is the item id and the value is item.
      Returns:
      map of all stored items