Package net.morimekta.providence.storage
Interface MessageReadOnlyStore<K,M extends net.morimekta.providence.PMessage<M>>
-
- Type Parameters:
K
- The key type.M
- The stored message type.
- All Superinterfaces:
ReadOnlyStore<K,M>
- All Known Subinterfaces:
MessageSetStore<K,M>
,MessageStore<K,M>
- All Known Implementing Classes:
DirectoryMessageSetStore
,DirectoryMessageStore
,InMemoryMessageSetStore
,InMemoryMessageStore
public interface MessageReadOnlyStore<K,M extends net.morimekta.providence.PMessage<M>> extends ReadOnlyStore<K,M>
Interface for storing messages of a single type. This is a read-only part of the store.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default <B extends net.morimekta.providence.PMessageBuilder<M>>
java.util.Map<K,B>getAllBuilders(java.util.Collection<K> keys)
Get builders for all keys requested.default <B extends net.morimekta.providence.PMessageBuilder<M>>
BgetBuilder(K key)
Get the builder representing the message on the given key.-
Methods inherited from interface net.morimekta.providence.storage.ReadOnlyStore
containsKey, get, getAll, keys, size
-
-
-
-
Method Detail
-
getBuilder
@Nullable default <B extends net.morimekta.providence.PMessageBuilder<M>> B getBuilder(@Nonnull K key)
Get the builder representing the message on the given key. Any modifications to the returned builder will not be reflected onto the store.- Type Parameters:
B
- The builder type.- Parameters:
key
- The key to find builder for.- Returns:
- The builder if message was found or null if not.
-
getAllBuilders
@Nonnull default <B extends net.morimekta.providence.PMessageBuilder<M>> java.util.Map<K,B> getAllBuilders(@Nonnull java.util.Collection<K> keys)
Get builders for all keys requested. Any modifications to the returned builders will not be reflected onto the store. The result map fill not contain any (key -> null) entries.- Type Parameters:
B
- The builder type.- Parameters:
keys
- Keys to look up.- Returns:
- The map of found entries.
-
-