Interface IBmPersistentIndex<P>

All Known Implementing Classes:
DurableStringIndex, StringIndex

public interface IBmPersistentIndex<P>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear persistent index
    boolean
    Test if persistent index contains specified key
    void
    Performs the given action for each entry in this index until all entries have been processed or the action throws an exception.
    get(String key)
    Get value by key
    Get key set of persistent index
    void
    put(String key, P value)
    Add key/value pair into persistent index
    void
    Put map of key/value pairs into index
    Remove specified key from persistent index
  • Method Details

    • keys

      Iterable<String> keys()
      Get key set of persistent index
      Returns:
      key set
    • clear

      void clear()
      Clear persistent index
    • containsKey

      boolean containsKey(String key)
      Test if persistent index contains specified key
      Parameters:
      key - key to test
      Returns:
      true - if index contains key, false - otherwise
    • remove

      P remove(String key)
      Remove specified key from persistent index
      Parameters:
      key - key to remove
      Returns:
      old value, associated with removed key or null
    • forEach

      void forEach(BiConsumer<String,P> action)
      Performs the given action for each entry in this index until all entries have been processed or the action throws an exception.
      Parameters:
      action - The action. May not be null.
    • put

      void put(String key, P value)
      Add key/value pair into persistent index
      Parameters:
      key - key to add
      value - value to add
    • putAll

      void putAll(Map<String,P> map)
      Put map of key/value pairs into index
      Parameters:
      map - map to add
    • get

      P get(String key)
      Get value by key
      Parameters:
      key - key
      Returns:
      value, associated with key in index or null (if index doesn't contain specified key)