Class Serialization$


  • public class Serialization$
    extends java.lang.Object
    • Field Detail

      • MODULE$

        public static final Serialization$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • Serialization$

        public Serialization$()
    • Method Detail

      • withTransportInformation

        public <T> T withTransportInformation​(ExtendedActorSystem system,
                                              scala.Function0<T> f)
        Sets serialization information in a ThreadLocal and runs f. The information is needed for serializing local actor refs, or if serializer library e.g. custom serializer/deserializer in Jackson need access to the current ActorSystem. The current Information can be accessed within f via Serialization.getCurrentTransportInformation().

        Akka Remoting sets this value when serializing and deserializing messages, and when using the ordinary serialize and deserialize methods in Serialization the value is also set automatically.

        Returns:
        value returned by f