Class ShardingMessageExtractor$

  • public class ShardingMessageExtractor$
    extends java.lang.Object
    • Field Detail

      • MODULE$

        public static final ShardingMessageExtractor$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • ShardingMessageExtractor$

        public ShardingMessageExtractor$()
    • Method Detail

      • apply

        public <M> ShardingMessageExtractor<ShardingEnvelope<M>,​M> apply​(int numberOfShards)
        Scala API:

        Create the default message extractor, using envelopes to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.

        This is recommended since it does not force details about sharding into the entity protocol

        numberOfShards - (undocumented)
      • noEnvelope

        public <M> ShardingMessageExtractor<M,​M> noEnvelope​(int numberOfShards,
                                                                  M stopMessage,
                                                                  scala.Function1<M,​java.lang.String> extractEntityId)
        Scala API: Create a message extractor for a protocol where the entity id is available in each message.
        numberOfShards - (undocumented)
        stopMessage - (undocumented)
        extractEntityId - (undocumented)