Class SerializerV2
A serializer that writes directly into caller-owned buffers and reads from sequence-backed input.
Assembly: Akka.dll
Syntax
public abstract class SerializerV2 : Serializer
Constructors
|
Edit this page
View Source
SerializerV2(ExtendedActorSystem)
Declaration
protected SerializerV2(ExtendedActorSystem system)
Parameters
| Type |
Name |
Description |
| ExtendedActorSystem |
system |
The actor system to associate with this serializer.
|
Fields
|
Edit this page
View Source
UnknownSize
Returned by SizeHint(object) when the serialized size cannot be cheaply predicted.
Declaration
public const int UnknownSize = -1
Field Value
Properties
|
Edit this page
View Source
IncludeManifest
V2 serializers use manifest-aware dispatch. New V2 serializers should emit
non-empty manifests; legacy serializer-id ports may preserve empty manifests.
Declaration
public override sealed bool IncludeManifest { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
Deserialize(ReadOnlySequence<byte>, string)
Deserializes bytes using a serializer manifest.
Declaration
public abstract object Deserialize(ReadOnlySequence<byte> bytes, string manifest)
Parameters
Returns
|
Edit this page
View Source
FromBinary(byte[], string)
Deserializes a byte array using a serializer manifest.
Declaration
public override object FromBinary(byte[] bytes, string manifest)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
| string |
manifest |
|
Returns
Overrides
|
Edit this page
View Source
FromBinary(byte[], Type)
Deserializes a byte array using a type manifest.
Declaration
public override object FromBinary(byte[] bytes, Type type)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
| Type |
type |
|
Returns
Overrides
|
Edit this page
View Source
Manifest(object)
Returns the manifest used by this serializer for obj.
Declaration
public override abstract string Manifest(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
Serialize(object, IBufferWriter<byte>)
Serializes obj into writer.
Declaration
public abstract int Serialize(object obj, IBufferWriter<byte> writer)
Parameters
Returns
| Type |
Description |
| int |
The number of payload bytes written.
|
|
Edit this page
View Source
SizeHint(object)
Returns the exact serialized size in bytes, or UnknownSize when the exact size cannot be cheaply computed.
Declaration
public virtual int SizeHint(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
|
Edit this page
View Source
ToBinary(object)
Serializes the given object into a byte array for compatibility boundaries.
Declaration
public override byte[] ToBinary(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
Extension Methods