Interface ReadOnlyStore<K,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean containsKey​(K key)  
      default V get​(K key)
      Get a single value from the storage.
      java.util.Map<K,​V> getAll​(java.util.Collection<K> keys)
      Look up a set of keys from the storage.
      java.util.Collection<K> keys()
      Get a collection of all the keys in the store.
      default int size()  
    • Method Detail

      • getAll

        @Nonnull
        java.util.Map<K,​V> getAll​(@Nonnull
                                        java.util.Collection<K> keys)
        Look up a set of keys from the storage.
        Parameters:
        keys - The keys to look up.
        Returns:
        Map of all the found key value pairs. Values not found should not have an entry in the result map (no key -> null mapping).
      • containsKey

        boolean containsKey​(@Nonnull
                            K key)
        Parameters:
        key - The key to look up.
        Returns:
        True if the key was contained in the map.
      • keys

        @Nonnull
        java.util.Collection<K> keys()
        Get a collection of all the keys in the store.
        Returns:
        Key collection.
      • get

        @Nullable
        default V get​(@Nonnull
                      K key)
        Get a single value from the storage.
        Parameters:
        key - The key to look up.
        Returns:
        The value if present.
      • size

        default int size()
        Returns:
        Get the total number of entries in the store, same as the number of unique keys.