Search Results for

    Show / Hide Table of Contents

    Class DistributedPubSubMessageSerializer

    Protobuf serializer of DistributedPubSubMediator messages.

    Inheritance
    object
    Serializer
    SerializerWithStringManifest
    DistributedPubSubMessageSerializer
    Inherited Members
    SerializerWithStringManifest.IncludeManifest
    SerializerWithStringManifest.FromBinary(byte[], Type)
    Serializer.system
    Serializer.Identifier
    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.Cluster.Tools.PublishSubscribe.Serialization
    Assembly: Akka.Cluster.Tools.dll
    Syntax
    public class DistributedPubSubMessageSerializer : SerializerWithStringManifest

    Constructors

    | Edit this page View Source

    DistributedPubSubMessageSerializer(ExtendedActorSystem)

    Initializes a new instance of the DistributedPubSubMessageSerializer class.

    Declaration
    public DistributedPubSubMessageSerializer(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).

    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)
    Exceptions
    Type Condition
    ArgumentException

    This exception is thrown when the specified bytescannot be deserialized using the specified manifest.

    | Edit this page View Source

    Manifest(object)

    Returns the manifest (type hint) that will be provided in the FromBinary(byte[], string) 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)
    Exceptions
    Type Condition
    ArgumentException

    This exception is thrown when the specified o does not have an associated manifest.

    | 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)
    Exceptions
    Type Condition
    ArgumentException

    This exception is thrown when the specified obj is of an unknown type. Acceptable types include: Akka.Cluster.Tools.PublishSubscribe.Internal.Status | Akka.Cluster.Tools.PublishSubscribe.Internal.Delta | Send | SendToAll | Publish

    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