Class ShardRegion.Passivate

  • All Implemented Interfaces:
    ShardRegion.ShardRegionCommand,, scala.Equals, scala.Product
    Enclosing class:

    public static final class ShardRegion.Passivate
    extends java.lang.Object
    implements ShardRegion.ShardRegionCommand, scala.Product,
    If the state of the entities are persistent you may stop entities that are not used to reduce memory consumption. This is done by the application specific implementation of the entity actors for example by defining receive timeout (context.setReceiveTimeout). If a message is already enqueued to the entity when it stops itself the enqueued message in the mailbox will be dropped. To support graceful passivation without losing such messages the entity actor can send this Passivate message to its parent ShardRegion. The specified wrapped stopMessage will be sent back to the entity, which is then supposed to stop itself. Incoming messages will be buffered by the ShardRegion between reception of Passivate and termination of the entity. Such buffered messages are thereafter delivered to a new incarnation of the entity.

    PoisonPill is a perfectly fine stopMessage.

    See Also:
    Serialized Form
    • Constructor Detail

      • Passivate

        public Passivate​(java.lang.Object stopMessage)
    • Method Detail

      • stopMessage

        public java.lang.Object stopMessage()
      • copy$default$1

        public java.lang.Object copy$default$1()
      • 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
      • productElementName

        public java.lang.String productElementName​(int x$1)
      • 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