Search Results for

    Show / Hide Table of Contents

    Class MiscMessageSerializer

    Inheritance
    object
    Serializer
    SerializerWithStringManifest
    MiscMessageSerializer
    Inherited Members
    SerializerWithStringManifest.IncludeManifest
    SerializerWithStringManifest.FromBinary(byte[], Type)
    Serializer.Identifier
    Serializer.ToBinaryWithAddress(Address, object)
    Serializer.FromBinary<T>(byte[])
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Remote.Serialization
    Assembly: Akka.Remote.dll
    Syntax
    public sealed class MiscMessageSerializer : SerializerWithStringManifest

    Constructors

    | Edit this page View Source

    MiscMessageSerializer(ExtendedActorSystem)

    Initializes a new instance of the MiscMessageSerializer class.

    Declaration
    public MiscMessageSerializer(ExtendedActorSystem system)
    Parameters
    Type Name Description
    ExtendedActorSystem system

    The actor system to associate with this serializer.

    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 override 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

    Overrides
    SerializerWithStringManifest.FromBinary(byte[], string)
    | 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 override string Manifest(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    string

    The manifest needed for the deserialization of the specified o.

    Overrides
    SerializerWithStringManifest.Manifest(object)
    | Edit this page View Source

    ToBinary(object)

    Serializes the given object into a byte array

    Declaration
    public override byte[] ToBinary(object obj)
    Parameters
    Type Name Description
    object obj

    The object to serialize

    Returns
    Type Description
    byte[]

    A byte array containing the serialized object

    Overrides
    Serializer.ToBinary(object)

    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