Package net.morimekta.providence.storage
Interface ReadOnlyStore<K,V>
-
- Type Parameters:
K- Key to use for gathering information.V- Value to fetch, that is a generic method.
- All Known Subinterfaces:
MessageListReadOnlyStore<K,M,F>,MessageListStore<K,M,F>,MessageReadOnlyStore<K,M,F>,MessageStore<K,M,F>,ReadWriteStore<K,V>
- All Known Implementing Classes:
DirectoryMessageListStore,DirectoryMessageStore,InMemoryMessageListStore,InMemoryMessageStore
public interface ReadOnlyStore<K,V>Interface to read a value or a range of values for a given key or keys.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancontainsKey(K key)default Vget(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.
-
-
-
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.
-
-