Package net.morimekta.providence.storage
Interface MessageListStore<K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField>
-
- All Superinterfaces:
MessageListReadOnlyStore<K,M,F>
,ReadOnlyStore<K,java.util.List<M>>
,ReadWriteStore<K,java.util.List<M>>
- All Known Implementing Classes:
DirectoryMessageListStore
,InMemoryMessageListStore
public interface MessageListStore<K,M extends net.morimekta.providence.PMessage<M,F>,F extends net.morimekta.providence.descriptor.PField> extends MessageListReadOnlyStore<K,M,F>, ReadWriteStore<K,java.util.List<M>>
Interface for storing messages of a single type.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default <B extends net.morimekta.providence.PMessageBuilder<M,F>>
java.util.Map<K,java.util.List<B>>putAllBuilders(java.util.Map<K,java.util.List<B>> builders)
Put messages into the map represented by their builders.default <B extends net.morimekta.providence.PMessageBuilder<M,F>>
java.util.List<B>putBuilders(K key, java.util.List<B> builders)
Put messages into the map represented by their builders.-
Methods inherited from interface net.morimekta.providence.storage.MessageListReadOnlyStore
getAllBuilders, getBuilders
-
Methods inherited from interface net.morimekta.providence.storage.ReadOnlyStore
containsKey, get, getAll, keys
-
Methods inherited from interface net.morimekta.providence.storage.ReadWriteStore
put, putAll, remove, removeAll
-
-
-
-
Method Detail
-
putBuilders
@Nullable default <B extends net.morimekta.providence.PMessageBuilder<M,F>> java.util.List<B> putBuilders(@Nonnull K key, @Nonnull java.util.List<B> builders)
Put messages into the map represented by their builders. Further modifications to the builders will not be reflected onto the contents of the store.- Type Parameters:
B
- The builder type.- Parameters:
key
- The key to put builders to.builders
- The list of builders to put.- Returns:
- The list of builders representing messages replaced, or null if new entry was created.
-
putAllBuilders
@Nonnull default <B extends net.morimekta.providence.PMessageBuilder<M,F>> java.util.Map<K,java.util.List<B>> putAllBuilders(@Nonnull java.util.Map<K,java.util.List<B>> builders)
Put messages into the map represented by their builders. Further modifications to the builders will not be reflected onto the contents of the store.- Type Parameters:
B
- The builder type.- Parameters:
builders
- Map of key to list of builders.- Returns:
- Map of builders that were replaced in the store. Will not contain (key -> null) mappings.
-
-