Interface ReadOnlyKeyValueStore<K,​V>

    • Method Detail

      • get

        V get​(K key)
        Get the value corresponding to this key.
        Parameters:
        key - The key to fetch
        Returns:
        The value or null if no value is found.
        Throws:
        NullPointerException - If null is used for key.
        InvalidStateStoreException - if the store is not initialized
      • range

        KeyValueIterator<K,​V> range​(K from,
                                          K to)
        Get an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe from ConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.
        Parameters:
        from - The first key that could be in the range
        to - The last key that could be in the range
        Returns:
        The iterator for this range.
        Throws:
        NullPointerException - If null is used for from or to.
        InvalidStateStoreException - if the store is not initialized
      • all

        KeyValueIterator<K,​V> all()
        Return an iterator over all keys in this store. This iterator must be closed after use. The returned iterator must be safe from ConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.
        Returns:
        An iterator of all key/value pairs in the store.
        Throws:
        InvalidStateStoreException - if the store is not initialized
      • approximateNumEntries

        long approximateNumEntries()
        Return an approximate count of key-value mappings in this store. The count is not guaranteed to be exact in order to accommodate stores where an exact count is expensive to calculate.
        Returns:
        an approximate count of key-value mappings in the store.
        Throws:
        InvalidStateStoreException - if the store is not initialized