CustomSerializerT Class

ScaleOut Software NamedCache API
Inheritance Hierarchy

SystemObject
  Soss.Client.ConcurrentCustomSerializerT
    Soss.Client.ConcurrentDefaultSerializerT

Namespace:  Soss.Client.Concurrent
Assembly:  soss_namedcache (in soss_namedcache.dll) Version: 6.1.0.0
Syntax

[SerializableAttribute]
public abstract class CustomSerializer<T>

Type Parameters

T
The type of the object to be serialized.

The CustomSerializerT type exposes the following members.

Constructors

  NameDescription
Protected methodCustomSerializerT
Initializes a new instance of the CustomSerializerT class
Top
Methods

  NameDescription
Public methodDeserialize
Deserializes an object previously serialized with Serialize(Stream, T) method from the supplied stream.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectType
Returns a type of the object.
Public methodGetSize
Returns the size of fixed size objects.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSerialize
Serializes an object into a Stream.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

By default NamedMapTKey, TValue uses Microsoft BinaryFormatter serializer, so it's important for the key and value types to be marked as Serializable. Using a CustomSerializer is advisable when implementing portable Java/C# objects or when you would like to get advantage of some high-performance serializers.

If serialization or deserialization of an object is not supported in its implementation, it should throw an NotSupportedException. This will trigger an attempt to fallback to standard serialization. However, it is not recommended to keep such objects in the cache when a custom serializer is defined. You can use a "magic number" in the beginning of the stream to distinguish custom serialized objects from ones using a standard serialization (based on the BinaryFormatter serializer).

See Also

Reference