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
- Alphabetic
- By Inheritance
- Serialization
- Extension
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Serialization(system: ExtendedActorSystem)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from Serialization to any2stringadd[Serialization] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (Serialization, B)
- Implicit
- This member is added by an implicit conversion from Serialization to ArrowAssoc[Serialization] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val AllowJavaSerialization: Boolean
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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.
-
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.
-
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.
-
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.
-
def
ensuring(cond: (Serialization) ⇒ Boolean, msg: ⇒ Any): Serialization
- Implicit
- This member is added by an implicit conversion from Serialization to Ensuring[Serialization] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (Serialization) ⇒ Boolean): Serialization
- Implicit
- This member is added by an implicit conversion from Serialization to Ensuring[Serialization] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Serialization
- Implicit
- This member is added by an implicit conversion from Serialization to Ensuring[Serialization] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): Serialization
- Implicit
- This member is added by an implicit conversion from Serialization to Ensuring[Serialization] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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. -
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Serialization to StringFormat[Serialization] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val log: LoggingAdapter
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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.
-
val
serializerByIdentity: Map[Int, Serializer]
Maps from a Serializer Identity (Int) to a Serializer instance (optimization)
-
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 theclazz
, 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. -
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.
- val settings: Settings
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val system: ExtendedActorSystem
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (Serialization, B)
- Implicit
- This member is added by an implicit conversion from Serialization to ArrowAssoc[Serialization] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc