K
- the key typeV
- the value typeKeyValueStore<K,V>
public interface ReadOnlyKeyValueStore<K,V>
Modifier and Type | Method | Description |
---|---|---|
KeyValueIterator<K,V> |
all() |
Return an iterator over all keys in this store.
|
long |
approximateNumEntries() |
Return an approximate count of key-value mappings in this store.
|
V |
get(K key) |
Get the value corresponding to this key.
|
KeyValueIterator<K,V> |
range(K from,
K to) |
Get an iterator over a given range of keys.
|
V get(K key)
key
- The key to fetchjava.lang.NullPointerException
- If null is used for key.InvalidStateStoreException
- if the store is not initializedKeyValueIterator<K,V> range(K from, K to)
ConcurrentModificationException
s
and must not return null values. No ordering guarantees are provided.from
- The first key that could be in the rangeto
- The last key that could be in the rangejava.lang.NullPointerException
- If null is used for from or to.InvalidStateStoreException
- if the store is not initializedKeyValueIterator<K,V> all()
ConcurrentModificationException
s
and must not return null values. No ordering guarantees are provided.InvalidStateStoreException
- if the store is not initializedlong approximateNumEntries()
InvalidStateStoreException
- if the store is not initialized