Package net.morimekta.providence.storage
Interface MessageStore<K,M extends PMessage<M>>
-
- All Superinterfaces:
MessageReadOnlyStore<K,M>
,ReadOnlyStore<K,M>
,ReadWriteStore<K,M>
- All Known Implementing Classes:
DirectoryMessageStore
,HazelcastMessageBuilderStorage
,HazelcastMessageStorage
,InMemoryMessageStore
public interface MessageStore<K,M extends PMessage<M>> extends MessageReadOnlyStore<K,M>, ReadWriteStore<K,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 PMessageBuilder<M>>
voidputAllBuilders(java.util.Map<K,B> builders)
Put a collection of key and builder pairs onto the store.default <B extends PMessageBuilder<M>>
voidputBuilder(K key, B builder)
Put the message represented by the builder into the store on the given key.-
Methods inherited from interface net.morimekta.providence.storage.MessageReadOnlyStore
getAllBuilders, getBuilder
-
Methods inherited from interface net.morimekta.providence.storage.ReadOnlyStore
containsKey, get, getAll, keys, size
-
Methods inherited from interface net.morimekta.providence.storage.ReadWriteStore
put, putAll, remove, removeAll
-
-
-
-
Method Detail
-
putBuilder
default <B extends PMessageBuilder<M>> void putBuilder(@Nonnull K key, @Nonnull B builder)
Put the message represented by the builder into the store on the given key. Any further modifications to the builder will not be reflected on the store.- Type Parameters:
B
- The builder type.- Parameters:
key
- The key to store the builder on.builder
- The builder to store.
-
putAllBuilders
default <B extends PMessageBuilder<M>> void putAllBuilders(@Nonnull java.util.Map<K,B> builders)
Put a collection of key and builder pairs onto the store. Any further modifications to the builders will not be reflected onto the store.- Type Parameters:
B
- The builder type.- Parameters:
builders
- Map of builders to put into the store.
-
-