Class HazelcastMessageStorage<Key,Message extends net.morimekta.providence.PMessage<Message,Field>,Field extends net.morimekta.providence.descriptor.PField>

  • All Implemented Interfaces:
    net.morimekta.providence.storage.MessageReadOnlyStore<Key,Message,Field>, net.morimekta.providence.storage.MessageStore<Key,Message,Field>, net.morimekta.providence.storage.ReadOnlyStore<Key,Message>, net.morimekta.providence.storage.ReadWriteStore<Key,Message>

    public class HazelcastMessageStorage<Key,Message extends net.morimekta.providence.PMessage<Message,Field>,Field extends net.morimekta.providence.descriptor.PField>
    extends java.lang.Object
    implements net.morimekta.providence.storage.MessageStore<Key,Message,Field>
    Note that the hazelcast message store is backed by the PMessage serializable property, which makes the message fields not indexable. If that is needed, use the HazelcastMessageBuilderStorage instead.

    On the other hand, this type of map is somewhat more efficient, and does not require the message to be generated with hazelcast portable support.

    • 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)  
      java.util.Collection<Key> keys()  
      java.util.Map<Key,Message> putAll​(java.util.Map<Key,Message> values)  
      java.util.Map<Key,Message> removeAll​(java.util.Collection<Key> keys)  
      • Methods inherited from interface net.morimekta.providence.storage.MessageReadOnlyStore

        getAllBuilders, getBuilder
      • Methods inherited from interface net.morimekta.providence.storage.MessageStore

        putAllBuilders, putBuilder
      • 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.ReadOnlyStore

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

        put, remove
    • Constructor Detail

      • HazelcastMessageStorage

        public HazelcastMessageStorage​(com.hazelcast.core.IMap<Key,Message> hazelcastMap)
    • Method Detail

      • putAll

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

        @Nonnull
        public java.util.Map<Key,Message> removeAll​(java.util.Collection<Key> keys)
        Specified by:
        removeAll in interface net.morimekta.providence.storage.ReadWriteStore<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>>
      • 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>>