Class ScatterGatherFirstCompletedRoutingLogic

java.lang.Object
org.apache.pekko.routing.ScatterGatherFirstCompletedRoutingLogic
All Implemented Interfaces:
Serializable, NoSerializationVerificationNeeded, RoutingLogic, scala.Equals, scala.Product

public final class ScatterGatherFirstCompletedRoutingLogic extends Object implements RoutingLogic, scala.Product, Serializable
Broadcasts the message to all routees, and replies with the first response.

param: within expecting at least one reply within this duration, otherwise it will reply with pekko.pattern.AskTimeoutException in a pekko.actor.Status.Failure

See Also:
  • Constructor Details

    • ScatterGatherFirstCompletedRoutingLogic

      public ScatterGatherFirstCompletedRoutingLogic(scala.concurrent.duration.FiniteDuration within)
  • Method Details

    • apply

      public static ScatterGatherFirstCompletedRoutingLogic apply(scala.concurrent.duration.FiniteDuration within)
    • unapply

      public static scala.Option<scala.concurrent.duration.FiniteDuration> unapply(ScatterGatherFirstCompletedRoutingLogic x$0)
    • within

      public scala.concurrent.duration.FiniteDuration within()
    • select

      public Routee select(Object message, scala.collection.immutable.IndexedSeq<Routee> routees)
      Description copied from interface: RoutingLogic
      Pick the destination for a given message. Normally it picks one of the passed routees, but in the end it is up to the implementation to return whatever pekko.routing.Routee to use for sending a specific message.

      When implemented from Java it can be good to know that routees.apply(index) can be used to get an element from the IndexedSeq.

      Specified by:
      select in interface RoutingLogic
    • copy

      public ScatterGatherFirstCompletedRoutingLogic copy(scala.concurrent.duration.FiniteDuration within)
    • copy$default$1

      public scala.concurrent.duration.FiniteDuration copy$default$1()
    • 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