Class ShardingProducerController.RequestNext<A>
- java.lang.Object
-
- akka.cluster.sharding.typed.delivery.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
TheProducerController
sendsRequestNext
to the producer when it is allowed to send one message via thesendNextTo
oraskNextTo
. It should wait for nextRequestNext
before sending one more message.entitiesWithDemand
contains information about which entities that have demand. It is allowed to send to a newentityId
that is not included in theentitiesWithDemand
. If sending to an entity that doesn't have demand the message will be buffered, and that can be seen in thebufferedForEntitiesWithoutDemand
.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 nextRequestNext
before sending more messages.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RequestNext(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<java.lang.String> entitiesWithDemand, scala.collection.immutable.Map<java.lang.String,java.lang.Object> bufferedForEntitiesWithoutDemand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActorRef<ShardingProducerController.MessageWithConfirmation<A>>
askNextTo()
scala.collection.immutable.Map<java.lang.String,java.lang.Object>
bufferedForEntitiesWithoutDemand()
boolean
canEqual(java.lang.Object x$1)
<A> ShardingProducerController.RequestNext<A>
copy(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<java.lang.String> entitiesWithDemand, scala.collection.immutable.Map<java.lang.String,java.lang.Object> bufferedForEntitiesWithoutDemand)
<A> ActorRef<ShardingEnvelope<A>>
copy$default$1()
<A> ActorRef<ShardingProducerController.MessageWithConfirmation<A>>
copy$default$2()
<A> scala.collection.immutable.Set<java.lang.String>
copy$default$3()
<A> scala.collection.immutable.Map<java.lang.String,java.lang.Object>
copy$default$4()
scala.collection.immutable.Set<java.lang.String>
entitiesWithDemand()
boolean
equals(java.lang.Object x$1)
java.util.Map<java.lang.String,java.lang.Integer>
getBufferedForEntitiesWithoutDemand()
Java APIjava.util.Set<java.lang.String>
getEntitiesWithDemand()
Java APIint
hashCode()
int
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
ActorRef<ShardingEnvelope<A>>
sendNextTo()
java.lang.String
toString()
-
-
-
Constructor Detail
-
RequestNext
public RequestNext(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<java.lang.String> entitiesWithDemand, scala.collection.immutable.Map<java.lang.String,java.lang.Object> bufferedForEntitiesWithoutDemand)
-
-
Method Detail
-
sendNextTo
public ActorRef<ShardingEnvelope<A>> sendNextTo()
-
askNextTo
public ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo()
-
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
public <A> ShardingProducerController.RequestNext<A> copy(ActorRef<ShardingEnvelope<A>> sendNextTo, ActorRef<ShardingProducerController.MessageWithConfirmation<A>> askNextTo, scala.collection.immutable.Set<java.lang.String> entitiesWithDemand, scala.collection.immutable.Map<java.lang.String,java.lang.Object> bufferedForEntitiesWithoutDemand)
-
copy$default$1
public <A> ActorRef<ShardingEnvelope<A>> copy$default$1()
-
copy$default$2
public <A> ActorRef<ShardingProducerController.MessageWithConfirmation<A>> copy$default$2()
-
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 interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-