Class HazelcastMessageSetBuilderStorage<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>,​Field extends net.morimekta.providence.descriptor.PField,​Builder extends net.morimekta.providence.PMessageBuilder<Message,​Field> & com.hazelcast.nio.serialization.Portable>

  • All Implemented Interfaces:
    net.morimekta.providence.storage.MessageReadOnlyStore<Key,​Message,​Field>, net.morimekta.providence.storage.MessageSetStore<Key,​Message,​Field>, net.morimekta.providence.storage.ReadOnlyStore<Key,​Message>, net.morimekta.providence.storage.ReadWriteSetStore<Key,​Message>

    public class HazelcastMessageSetBuilderStorage<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>,​Field extends net.morimekta.providence.descriptor.PField,​Builder extends net.morimekta.providence.PMessageBuilder<Message,​Field> & com.hazelcast.nio.serialization.Portable>
    extends java.lang.Object
    implements net.morimekta.providence.storage.MessageSetStore<Key,​Message,​Field>
    A message store containing message builders. Note that there are no 'list' variants of this type of store. The benefit of using the HazelcastMessageSetBuilderStorage is that it can be combined with using the hazelcast Portable indexing and query systems.
    See Also:
    And Hazelcast Docs for reference on how to utilize portable and querying the data grid.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(Key key)  
      java.util.Map<Key,​Message> getAll​(java.util.Collection<Key> keys)  
      <B extends net.morimekta.providence.PMessageBuilder<Message,​Field>>
      java.util.Map<Key,​B>
      getAllBuilders​(java.util.Collection<Key> keys)  
      java.util.Collection<Key> keys()  
      java.util.Map<Key,​Message> putAll​(java.util.Collection<Message> values)  
      <B extends net.morimekta.providence.PMessageBuilder<Message,​Field>>
      java.util.Map<Key,​B>
      putAllBuilders​(java.util.Collection<B> builders)  
      java.util.Map<Key,​Message> removeAll​(java.util.Collection<Key> keys)  
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface net.morimekta.providence.storage.MessageReadOnlyStore

        getBuilder
      • Methods inherited from interface net.morimekta.providence.storage.MessageSetStore

        putBuilder
      • Methods inherited from interface net.morimekta.providence.storage.ReadOnlyStore

        get
      • Methods inherited from interface net.morimekta.providence.storage.ReadWriteSetStore

        put, remove
    • Constructor Detail

      • HazelcastMessageSetBuilderStorage

        public HazelcastMessageSetBuilderStorage​(java.util.function.Function<Message,​Key> messageToKey,
                                                 com.hazelcast.core.IMap<Key,​Builder> hazelcastMap)
    • Method Detail

      • putAll

        @Nonnull
        public java.util.Map<Key,​Message> putAll​(@Nonnull
                                                       java.util.Collection<Message> values)
        Specified by:
        putAll in interface net.morimekta.providence.storage.ReadWriteSetStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>>
      • putAllBuilders

        @Nonnull
        public <B extends net.morimekta.providence.PMessageBuilder<Message,​Field>> java.util.Map<Key,​B> putAllBuilders​(@Nonnull
                                                                                                                                   java.util.Collection<B> builders)
        Specified by:
        putAllBuilders in interface net.morimekta.providence.storage.MessageSetStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>,​Field extends net.morimekta.providence.descriptor.PField>
      • removeAll

        @Nonnull
        public java.util.Map<Key,​Message> removeAll​(java.util.Collection<Key> keys)
        Specified by:
        removeAll in interface net.morimekta.providence.storage.ReadWriteSetStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>>
      • getAll

        @Nonnull
        public java.util.Map<Key,​Message> getAll​(@Nonnull
                                                       java.util.Collection<Key> keys)
        Specified by:
        getAll in interface net.morimekta.providence.storage.ReadOnlyStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>>
      • getAllBuilders

        @Nonnull
        public <B extends net.morimekta.providence.PMessageBuilder<Message,​Field>> java.util.Map<Key,​B> getAllBuilders​(@Nonnull
                                                                                                                                   java.util.Collection<Key> keys)
        Specified by:
        getAllBuilders in interface net.morimekta.providence.storage.MessageReadOnlyStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>,​Field extends net.morimekta.providence.descriptor.PField>
      • containsKey

        public boolean containsKey​(@Nonnull
                                   Key key)
        Specified by:
        containsKey in interface net.morimekta.providence.storage.ReadOnlyStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>>
      • keys

        @Nonnull
        public java.util.Collection<Key> keys()
        Specified by:
        keys in interface net.morimekta.providence.storage.ReadOnlyStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>>
      • size

        public int size()
        Specified by:
        size in interface net.morimekta.providence.storage.ReadOnlyStore<Key,​Message extends net.morimekta.providence.PMessage<Message,​Field>>