Search Results for

    Show / Hide Table of Contents

    Class StreamRefSerializer

    Inheritance
    object
    Serializer
    SerializerWithStringManifest
    StreamRefSerializer
    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.Streams.Serialization
    Assembly: Akka.Streams.dll
    Syntax
    public sealed class StreamRefSerializer : SerializerWithStringManifest

    Constructors

    | Edit this page View Source

    StreamRefSerializer(ExtendedActorSystem)

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

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

    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 o)
    Parameters
    Type Name Description
    object o
    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