Class SerializerWithStringManifest
TBD
Inheritance
Inherited Members
Namespace: Akka.Serialization
Assembly: Akka.dll
Syntax
public abstract class SerializerWithStringManifest : Serializer
Constructors
| Improve this Doc View SourceSerializerWithStringManifest(ExtendedActorSystem)
Initializes a new instance of the SerializerWithStringManifest class.
Declaration
protected SerializerWithStringManifest(ExtendedActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ExtendedActorSystem | system | The actor system to associate with this serializer. |
Properties
| Improve this Doc View SourceIncludeManifest
Returns whether this serializer needs a manifest in the fromBinary method
Declaration
public sealed override bool IncludeManifest { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Methods
| Improve this Doc View SourceFromBinary(Byte[], String)
Deserializes a byte array into an object using an optional manifest
(type hint).
It's recommended to throw SerializationException in FromBinary(Byte[], String) if the manifest is unknown.This makes it possible to introduce new message types and send them to nodes that don't know about them. This is typically needed when performing rolling upgrades, i.e.running a cluster with mixed versions for while. SerializationException is treated as a transient problem in the TCP based remoting layer.The problem will be logged and message is dropped.Other exceptions will tear down the TCP connection because it can be an indication of corrupt bytes from the underlying transport.
Declaration
public abstract object FromBinary(byte[] bytes, string manifest)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | The array containing the serialized object |
String | manifest | The type hint used to deserialize the object contained in the array. |
Returns
Type | Description |
---|---|
Object | The object contained in the array |
FromBinary(Byte[], Type)
Deserializes a byte array into an object of type type
.
It's recommended to throw SerializationException in FromBinary(Byte[], Type) if the manifest is unknown.This makes it possible to introduce new message types and send them to nodes that don't know about them. This is typically needed when performing rolling upgrades, i.e.running a cluster with mixed versions for while. SerializationException is treated as a transient problem in the TCP based remoting layer.The problem will be logged and message is dropped.Other exceptions will tear down the TCP connection because it can be an indication of corrupt bytes from the underlying transport.
Declaration
public sealed override object FromBinary(byte[] bytes, Type type)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | The array containing the serialized object |
Type | type | The type of object contained in the array |
Returns
Type | Description |
---|---|
Object | The object contained in the array |
Overrides
| Improve this Doc View SourceManifest(Object)
Returns the manifest (type hint) that will be provided in the FromBinary(Byte[], Type) method.
note
This method returns Empty if a manifest is not needed.
Declaration
public abstract string Manifest(object o)
Parameters
Type | Name | Description |
---|---|---|
Object | o | The object for which the manifest is needed. |
Returns
Type | Description |
---|---|
String | The manifest needed for the deserialization of the specified |