Class PoolRouterBuilder<T>

  • All Implemented Interfaces:
    PoolRouter<T>,, scala.Equals, scala.Product, scala.Serializable

    public final class PoolRouterBuilder<T>
    extends PoolRouter<T>
    implements PoolRouter<T>, scala.Product, scala.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • PoolRouterBuilder

        public PoolRouterBuilder​(int poolSize,
                                 Behavior<T> behavior,
                                 scala.Function0<RoutingLogic<T>> logicFactory)
    • Method Detail

      • poolSize

        public int poolSize()
      • logicFactory

        public scala.Function0<RoutingLogic<T>> logicFactory()
      • withRandomRouting

        public PoolRouterBuilder<T> withRandomRouting()
        Description copied from interface: PoolRouter
        Route messages by randomly selecting the routee from the available routees.

        Random routing makes it less likely that every poolsize message from a single producer ends up in the same mailbox of a slow actor.

        Specified by:
        withRandomRouting in interface PoolRouter<T>
        Specified by:
        withRandomRouting in class PoolRouter<T>
      • withRoundRobinRouting

        public PoolRouterBuilder<T> withRoundRobinRouting()
        Description copied from class: PoolRouter
        Route messages through round robin, providing a fair distribution of messages across the routees.

        Round robin gives fair routing where every available routee gets the same amount of messages

        This is the default for pool routers.

        Specified by:
        withRoundRobinRouting in interface PoolRouter<T>
        Specified by:
        withRoundRobinRouting in class PoolRouter<T>
      • copy$default$1

        public <T> int copy$default$1()
      • copy$default$2

        public <T> Behavior<T> copy$default$2()
      • copy$default$3

        public <T> scala.Function0<RoutingLogic<T>> copy$default$3()
      • 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
      • hashCode

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

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

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