Class RemoteRouterConfig

java.lang.Object
org.apache.pekko.remote.routing.RemoteRouterConfig
All Implemented Interfaces:
Serializable, Pool, RouterConfig, scala.Equals, scala.Product

public final class RemoteRouterConfig extends Object implements Pool, scala.Product, Serializable
pekko.routing.RouterConfig implementation for remote deployment on defined target nodes. Delegates other duties to the local pekko.routing.Pool, which makes it possible to mix this with the built-in routers such as pekko.routing.RoundRobinGroup or custom routers.
See Also:
  • Constructor Details

    • RemoteRouterConfig

      public RemoteRouterConfig(Pool local, scala.collection.Iterable<Address> nodes)
    • RemoteRouterConfig

      public RemoteRouterConfig(Pool local, Iterable<Address> nodes)
    • RemoteRouterConfig

      public RemoteRouterConfig(Pool local, Address[] nodes)
  • Method Details

    • apply

      public static RemoteRouterConfig apply(Pool local, scala.collection.Iterable<Address> nodes)
    • unapply

      public static scala.Option<scala.Tuple2<Pool,scala.collection.Iterable<Address>>> unapply(RemoteRouterConfig x$0)
    • local

      public Pool local()
    • nodes

      public scala.collection.Iterable<Address> nodes()
    • createRouter

      public Router createRouter(ActorSystem system)
      Description copied from interface: RouterConfig
      Create the actual router, responsible for routing messages to routees.

      Specified by:
      createRouter in interface RouterConfig
      Parameters:
      system - the ActorSystem this router belongs to
    • nrOfInstances

      public int nrOfInstances(ActorSystem sys)
      Description copied from interface: Pool
      Initial number of routee instances
      Specified by:
      nrOfInstances in interface Pool
    • newRoutee

      public Routee newRoutee(Props routeeProps, ActorContext context)
      Description copied from interface: Pool
      INTERNAL API
      Specified by:
      newRoutee in interface Pool
    • createRouterActor

      public org.apache.pekko.routing.RouterActor createRouterActor()
      Description copied from interface: Pool
      INTERNAL API
      Specified by:
      createRouterActor in interface Pool
      Specified by:
      createRouterActor in interface RouterConfig
    • supervisorStrategy

      public SupervisorStrategy supervisorStrategy()
      Description copied from interface: Pool
      SupervisorStrategy for the head actor, i.e. for supervising the routees of the pool.
      Specified by:
      supervisorStrategy in interface Pool
    • routerDispatcher

      public String routerDispatcher()
      Description copied from interface: RouterConfig
      Dispatcher ID to use for running the &ldquo;head&rdquo; actor, which handles supervision, death watch and router management messages
      Specified by:
      routerDispatcher in interface RouterConfig
    • resizer

      public scala.Option<Resizer> resizer()
      Description copied from interface: Pool
      Pool with dynamically resizable number of routees return the pekko.routing.Resizer to use. The resizer is invoked once when the router is created, before any messages can be sent to it. Resize is also triggered when messages are sent to the routees, and the resizer is invoked asynchronously, i.e. not necessarily before the message has been sent.
      Specified by:
      resizer in interface Pool
    • withFallback

      public RouterConfig withFallback(RouterConfig other)
      Description copied from interface: RouterConfig
      Overridable merge strategy, by default completely prefers this (i.e. no merge).
      Specified by:
      withFallback in interface RouterConfig
    • copy

      public RemoteRouterConfig copy(Pool local, scala.collection.Iterable<Address> nodes)
    • copy$default$1

      public Pool copy$default$1()
    • copy$default$2

      public scala.collection.Iterable<Address> copy$default$2()
    • productPrefix

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

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

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

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

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

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

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

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

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