Search Results for

    Show / Hide Table of Contents

    Class SerializerWithStringManifest

    TBD

    Inheritance
    object
    Serializer
    SerializerWithStringManifest
    ClusterMetricsMessageSerializer
    ClusterShardingMessageSerializer
    ClusterClientMessageSerializer
    DistributedPubSubMessageSerializer
    ClusterSingletonMessageSerializer
    ReplicatedDataSerializer
    ReplicatorMessageSerializer
    TestSerializer
    MiscMessageSerializer
    PrimitiveSerializers
    StreamRefSerializer
    Inherited Members
    Serializer.system
    Serializer.Identifier
    Serializer.ToBinary(object)
    Serializer.ToBinaryWithAddress(Address, object)
    Serializer.FromBinary<T>(byte[])
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Serialization
    Assembly: Akka.dll
    Syntax
    public abstract class SerializerWithStringManifest : Serializer

    Constructors

    | Edit this page View Source

    SerializerWithStringManifest(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

    | Edit this page View Source

    IncludeManifest

    Returns whether this serializer needs a manifest in the fromBinary method

    Declaration
    public override sealed bool IncludeManifest { get; }
    Property Value
    Type Description
    bool
    Overrides
    Serializer.IncludeManifest

    Methods

    | Edit this page View Source

    FromBinary(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

    | Edit this page View Source

    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 override sealed 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
    Serializer.FromBinary(byte[], Type)
    | Edit this page View Source

    Manifest(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 o.

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET