Class ShardingProducerController.RequestNext<A>

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product
    Enclosing class:
    ShardingProducerController

    public static final class ShardingProducerController.RequestNext<A>
    extends java.lang.Object
    implements scala.Product, java.io.Serializable
    The ProducerController sends RequestNext to the producer when it is allowed to send one message via the sendNextTo or askNextTo. It should wait for next RequestNext before sending one more message.

    entitiesWithDemand contains information about which entities that have demand. It is allowed to send to a new entityId that is not included in the entitiesWithDemand. If sending to an entity that doesn't have demand the message will be buffered, and that can be seen in the bufferedForEntitiesWithoutDemand.

    This support for buffering means that it is even allowed to send several messages in response to one RequestNext but it's recommended to only send one message and wait for next RequestNext before sending more messages.

    See Also:
    Serialized Form
    • Method Detail

      • entitiesWithDemand

        public scala.collection.immutable.Set<java.lang.String> entitiesWithDemand()
      • bufferedForEntitiesWithoutDemand

        public scala.collection.immutable.Map<java.lang.String,​java.lang.Object> bufferedForEntitiesWithoutDemand()
      • getEntitiesWithDemand

        public java.util.Set<java.lang.String> getEntitiesWithDemand()
        Java API
      • getBufferedForEntitiesWithoutDemand

        public java.util.Map<java.lang.String,​java.lang.Integer> getBufferedForEntitiesWithoutDemand()
        Java API
      • copy$default$3

        public <A> scala.collection.immutable.Set<java.lang.String> copy$default$3()
      • copy$default$4

        public <A> scala.collection.immutable.Map<java.lang.String,​java.lang.Object> copy$default$4()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • productElementName

        public java.lang.String productElementName​(int x$1)
        Specified by:
        productElementName in interface scala.Product
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object