Class GroupRouterBuilder<T>
- java.lang.Object
-
- akka.actor.typed.Behavior<T>
-
- akka.actor.typed.Behavior.DeferredBehavior<T>
-
- akka.actor.typed.javadsl.GroupRouter<T>
-
- akka.actor.typed.internal.routing.GroupRouterBuilder<T>
-
- All Implemented Interfaces:
GroupRouter<T>
,java.io.Serializable
,scala.Equals
,scala.Product
,scala.Serializable
public final class GroupRouterBuilder<T> extends GroupRouter<T> implements GroupRouter<T>, scala.Product, scala.Serializable
Provides builder style configuration options for group routers while still being a behavior that can be spawnedINTERNAL API
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.actor.typed.Behavior
Behavior.BehaviorDecorators<T>, Behavior.BehaviorDecorators$, Behavior.DeferredBehavior<T>, Behavior.DeferredBehavior$, Behavior.EmptyBehavior$, Behavior.FailedBehavior, Behavior.IgnoreBehavior$, Behavior.SameBehavior$, Behavior.StoppedBehavior<T>, Behavior.StoppedBehavior$, Behavior.UnhandledBehavior$
-
-
Constructor Summary
Constructors Constructor Description GroupRouterBuilder(ServiceKey<T> key, scala.Function0<RoutingLogic<T>> logicFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> scala.Function0<RoutingLogics.RandomLogic<T>>
$lessinit$greater$default$2()
Behavior<T>
apply(TypedActorContext<T> ctx)
static <T> scala.Function0<RoutingLogics.RandomLogic<T>>
apply$default$2()
boolean
canEqual(java.lang.Object x$1)
<T> GroupRouterBuilder<T>
copy(ServiceKey<T> key, scala.Function0<RoutingLogic<T>> logicFactory)
<T> ServiceKey<T>
copy$default$1()
<T> scala.Function0<RoutingLogic<T>>
copy$default$2()
boolean
equals(java.lang.Object x$1)
int
hashCode()
ServiceKey<T>
key()
scala.Function0<RoutingLogic<T>>
logicFactory()
int
productArity()
java.lang.Object
productElement(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
java.lang.String
toString()
static <T> scala.Option<scala.Tuple2<ServiceKey<T>,scala.Function0<RoutingLogic<T>>>>
unapply(GroupRouterBuilder<T> x$0)
GroupRouterBuilder<T>
withRandomRouting()
Route messages by randomly selecting the routee from the available routees.GroupRouterBuilder<T>
withRoundRobinRouting()
Route messages by using round robin.-
Methods inherited from class akka.actor.typed.Behavior
_tag, BehaviorDecorators, canonicalize, empty, existsInStack, failed, ignore, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, orElse, same, start, stopped, stopped, unhandled, unhandledSignal, unsafeCast, validateAsInitial
-
-
-
-
Constructor Detail
-
GroupRouterBuilder
public GroupRouterBuilder(ServiceKey<T> key, scala.Function0<RoutingLogic<T>> logicFactory)
-
-
Method Detail
-
$lessinit$greater$default$2
public static <T> scala.Function0<RoutingLogics.RandomLogic<T>> $lessinit$greater$default$2()
-
apply$default$2
public static <T> scala.Function0<RoutingLogics.RandomLogic<T>> apply$default$2()
-
unapply
public static <T> scala.Option<scala.Tuple2<ServiceKey<T>,scala.Function0<RoutingLogic<T>>>> unapply(GroupRouterBuilder<T> x$0)
-
key
public ServiceKey<T> key()
-
logicFactory
public scala.Function0<RoutingLogic<T>> logicFactory()
-
apply
public Behavior<T> apply(TypedActorContext<T> ctx)
- Specified by:
apply
in classBehavior.DeferredBehavior<T>
-
withRandomRouting
public GroupRouterBuilder<T> withRandomRouting()
Description copied from interface:GroupRouter
Route messages by randomly selecting the routee from the available routees. This is the default for group routers.- Specified by:
withRandomRouting
in interfaceGroupRouter<T>
- Specified by:
withRandomRouting
in classGroupRouter<T>
- Returns:
- (undocumented)
-
withRoundRobinRouting
public GroupRouterBuilder<T> withRoundRobinRouting()
Description copied from class:GroupRouter
Route messages by using round robin.Round robin gives fair routing where every available routee gets the same amount of messages as long as the set of routees stays relatively stable, but may be unfair if the set of routees changes a lot.
- Specified by:
withRoundRobinRouting
in interfaceGroupRouter<T>
- Specified by:
withRoundRobinRouting
in classGroupRouter<T>
- Returns:
- (undocumented)
-
copy
public <T> GroupRouterBuilder<T> copy(ServiceKey<T> key, scala.Function0<RoutingLogic<T>> logicFactory)
-
copy$default$1
public <T> ServiceKey<T> copy$default$1()
-
copy$default$2
public <T> scala.Function0<RoutingLogic<T>> copy$default$2()
-
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
-
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
-
-