Class ConsistentHashingRouter.ConsistentHashableEnvelope

java.lang.Object
org.apache.pekko.routing.ConsistentHashingRouter.ConsistentHashableEnvelope
All Implemented Interfaces:
Serializable, WrappedMessage, ConsistentHashingRouter.ConsistentHashable, RouterEnvelope, scala.Equals, scala.Product
Enclosing class:
ConsistentHashingRouter

public static final class ConsistentHashingRouter.ConsistentHashableEnvelope extends Object implements ConsistentHashingRouter.ConsistentHashable, RouterEnvelope, WrappedMessage, scala.Product, Serializable
If you don't define the hashMapping when constructing the pekko.routing.ConsistentHashingRouter and messages can't implement pekko.routing.ConsistentHashingRouter.ConsistentHashable themselves they can we wrapped by this envelope instead. The router will only send the wrapped message to the destination, i.e. the envelope will be stripped off.
See Also:
  • Constructor Details

    • ConsistentHashableEnvelope

      public ConsistentHashableEnvelope(Object message, Object hashKey)
  • Method Details

    • message

      public Object message()
      Specified by:
      message in interface RouterEnvelope
      Specified by:
      message in interface WrappedMessage
    • hashKey

      public Object hashKey()
    • consistentHashKey

      public Object consistentHashKey()
      Specified by:
      consistentHashKey in interface ConsistentHashingRouter.ConsistentHashable
    • copy

    • copy$default$1

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

      public Object 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