class Serialization extends Extension

Serialization module. Contains methods for serialization and deserialization as well as locating a Serializer for a particular class as defined in the mapping in the configuration.

Source
Serialization.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Serialization
  2. Extension
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Serialization(system: ExtendedActorSystem)

Value Members

  1. val AllowJavaSerialization: Boolean
  2. def deserialize[T](bytes: Array[Byte], clazz: Class[T]): Try[T]

    Deserializes the given array of bytes using the specified type to look up what Serializer should be used.

    Deserializes the given array of bytes using the specified type to look up what Serializer should be used. Returns either the resulting object or an Exception if one was thrown.

  3. def deserialize(bytes: Array[Byte], serializerId: Int, manifest: String): Try[AnyRef]

    Deserializes the given array of bytes using the specified serializer id, using the optional type hint to the Serializer.

    Deserializes the given array of bytes using the specified serializer id, using the optional type hint to the Serializer. Returns either the resulting object or an Exception if one was thrown.

  4. def deserialize[T](bytes: Array[Byte], serializerId: Int, clazz: Option[Class[_ <: T]]): Try[T]

    Deserializes the given array of bytes using the specified serializer id, using the optional type hint to the Serializer.

    Deserializes the given array of bytes using the specified serializer id, using the optional type hint to the Serializer. Returns either the resulting object or an Exception if one was thrown.

  5. def deserializeByteBuffer(buf: ByteBuffer, serializerId: Int, manifest: String): AnyRef

    Deserializes the given ByteBuffer of bytes using the specified serializer id, using the optional type hint to the Serializer.

    Deserializes the given ByteBuffer of bytes using the specified serializer id, using the optional type hint to the Serializer. Returns either the resulting object or throws an exception if deserialization fails.

    Annotations
    @throws( classOf[NotSerializableException] )
  6. def findSerializerFor(o: AnyRef): Serializer

    Returns the Serializer configured for the given object, returns the NullSerializer if it's null.

    Returns the Serializer configured for the given object, returns the NullSerializer if it's null.

    Throws akka.ConfigurationException if no serialization-bindings is configured for the class of the object.

  7. val log: LoggingAdapter
  8. def serialize(o: AnyRef): Try[Array[Byte]]

    Serializes the given AnyRef/java.lang.Object according to the Serialization configuration to either an Array of Bytes or an Exception if one was thrown.

  9. val serializerByIdentity: Map[Int, Serializer]

    Maps from a Serializer Identity (Int) to a Serializer instance (optimization)

  10. def serializerFor(clazz: Class[_]): Serializer

    Returns the configured Serializer for the given Class.

    Returns the configured Serializer for the given Class. The configured Serializer is used if the configured class isAssignableFrom from the clazz, i.e. the configured class is a super class or implemented interface. In case of ambiguity it is primarily using the most specific configured class, and secondly the entry configured first.

    Throws java.io.NotSerializableException if no serialization-bindings is configured for the class.

    Annotations
    @throws( classOf[NotSerializableException] )
  11. def serializerOf(serializerFQN: String): Try[Serializer]

    Tries to load the specified Serializer by the fully-qualified name; the actual loading is performed by the system’s akka.actor.DynamicAccess.

  12. val settings: Settings
  13. val system: ExtendedActorSystem