Class ShardingProducerController.RequestNext<A>
java.lang.Object
org.apache.pekko.cluster.sharding.typed.delivery.ShardingProducerController.RequestNext<A>
- All Implemented Interfaces:
Serializable
,scala.Equals
,scala.Product
- Enclosing class:
- ShardingProducerController
public static final class ShardingProducerController.RequestNext<A>
extends Object
implements scala.Product, 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:
-
Constructor Summary
ConstructorsConstructorDescriptionRequestNext
(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<String> entitiesWithDemand, scala.collection.immutable.Map<String, Object> bufferedForEntitiesWithoutDemand) -
Method Summary
Modifier and TypeMethodDescriptionboolean
copy
(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<String> entitiesWithDemand, scala.collection.immutable.Map<String, Object> bufferedForEntitiesWithoutDemand) <A> ActorRef<ShardingEnvelope<A>>
<A> scala.collection.immutable.Set<String>
scala.collection.immutable.Set<String>
boolean
Java APIJava APIint
hashCode()
int
productElement
(int x$1) productElementName
(int x$1) scala.collection.Iterator<Object>
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface scala.Product
productElementNames
-
Constructor Details
-
RequestNext
public RequestNext(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<String> entitiesWithDemand, scala.collection.immutable.Map<String, Object> bufferedForEntitiesWithoutDemand)
-
-
Method Details
-
sendNextTo
-
askNextTo
-
entitiesWithDemand
-
bufferedForEntitiesWithoutDemand
-
getEntitiesWithDemand
Java API -
getBufferedForEntitiesWithoutDemand
Java API -
copy
public <A> ShardingProducerController.RequestNext<A> copy(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<String> entitiesWithDemand, scala.collection.immutable.Map<String, Object> bufferedForEntitiesWithoutDemand) -
copy$default$1
-
copy$default$2
-
copy$default$3
-
copy$default$4
-
productPrefix
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()- Specified by:
productArity
in interfacescala.Product
-
productElement
- Specified by:
productElement
in interfacescala.Product
-
productIterator
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode() -
toString
-
equals
-