Package net.morimekta.providence.storage
Interface MessageListReadOnlyStore<K,M extends PMessage<M>>
-
- Type Parameters:
K
- The key type.M
- The stored message type.
- All Superinterfaces:
ReadOnlyStore<K,java.util.List<M>>
- All Known Subinterfaces:
MessageListStore<K,M>
- All Known Implementing Classes:
DirectoryMessageListStore
,HazelcastMessageListStorage
,InMemoryMessageListStore
public interface MessageListReadOnlyStore<K,M extends PMessage<M>> extends ReadOnlyStore<K,java.util.List<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 PMessageBuilder<M>>
java.util.Map<K,java.util.List<B>>getAllBuilders(java.util.Collection<K> keys)
Get map of lists of builders for all the messages for the requested keys.default <B extends PMessageBuilder<M>>
java.util.List<B>getBuilders(K key)
Get a list of builders for the entry stored.-
Methods inherited from interface net.morimekta.providence.storage.ReadOnlyStore
containsKey, get, getAll, keys, size
-
-
-
-
Method Detail
-
getBuilders
@Nullable default <B extends PMessageBuilder<M>> java.util.List<B> getBuilders(@Nonnull K key)
Get a list of builders for the entry stored. Any modifications to the returned builders will not be reflected onto the store.- Type Parameters:
B
- The builder type.- Parameters:
key
- The key to look up.- Returns:
- List of builders for stored on the key or null if not found.
-
getAllBuilders
@Nonnull default <B extends PMessageBuilder<M>> java.util.Map<K,java.util.List<B>> getAllBuilders(@Nonnull java.util.Collection<K> keys)
Get map of lists of builders for all the messages for the requested keys. The resulting map will not contain key -> null mappings. Any modifications to the returned builders will not be reflected onto the store.- Type Parameters:
B
- The builder type.- Parameters:
keys
- Collection of keys to request.- Returns:
- Map of entries found.
-
-