Interface Store<ApiType>

All Known Subinterfaces:
Indexer<ApiType>
All Known Implementing Classes:
Cache

public interface Store<ApiType>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(ApiType obj)
    add inserts an item into the store.
    void
    delete removes an item from the store.
    get(ApiType obj)
    get returns the requested item.
    getByKey returns the request item with specific key.
    list returns a list of all the items.
    listKeys returns a list of all the keys of the object currently in the store.
    void
    replace(List<ApiType> list, String resourceVersion)
    Replace will delete the contents of 'c', using instead the given list.
    void
    resync will send a resync event for each item.
    void
    update sets an item in the store to its updated state.
  • Method Details

    • add

      void add(ApiType obj)
      add inserts an item into the store.
      Parameters:
      obj - specific obj
    • update

      void update(ApiType obj)
      update sets an item in the store to its updated state.
      Parameters:
      obj - specific obj
    • delete

      void delete(ApiType obj)
      delete removes an item from the store.
      Parameters:
      obj - specific obj
    • replace

      void replace(List<ApiType> list, String resourceVersion)
      Replace will delete the contents of 'c', using instead the given list.
      Parameters:
      list - list of objects
      resourceVersion - specific resource version
    • resync

      void resync()
      resync will send a resync event for each item.
    • listKeys

      List<String> listKeys()
      listKeys returns a list of all the keys of the object currently in the store.
      Returns:
      list of all keys
    • get

      Object get(ApiType obj)
      get returns the requested item.
      Parameters:
      obj - specific obj
      Returns:
      the requested item if exist
    • getByKey

      ApiType getByKey(String key)
      getByKey returns the request item with specific key.
      Parameters:
      key - specific key
      Returns:
      the request item
    • list

      List<ApiType> list()
      list returns a list of all the items.
      Returns:
      list of all the items