Show / Hide Table of Contents

Class TraceEnvelopeSerializer

Serializer implementation for passing IWithTrace instances back and forth across the wire.

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

Constructors

TraceEnvelopeSerializer(ExtendedActorSystem)

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

Fields

WithTraceManifest

Declaration
public const string WithTraceManifest = "WTRACE"
Field Value
Type Description
string

Properties

Tracer

Declaration
public Tracer Tracer { get; }
Property Value
Type Description
Tracer

Methods

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)

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)

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)
In this article

Phobos®

APM for Akka.NET Applications

Product
  • Purchase Phobos
  • Book a Live Demo
  • Phobos Quick Start Guide
  • Phobos Features
  • API Documentation
  • Release Notes
Resources
  • Akka.NET Documentation
  • Petabridge Blog
  • Akka.NET Support Plans
  • Akka.NET Consulting Services
  • Akka.NET Training
Company
  • About Petabridge
  • Contact Us
  • Privacy Policy

© 2025 Petabridge®. All rights reserved. Built with ♥ for the Akka.NET community.