Table of Contents

Class KNetSerialization

Namespace
MASES.KNet.Serialization
Assembly
MASES.KNet.dll

Helper for KNetSerDes

public static class KNetSerialization
Inheritance
KNetSerialization
Inherited Members

Fields

KeySerializerIdentifier

Identity the serializer for the key

public const string KeySerializerIdentifier = "key-serializer-type"

Field Value

string

KeySerializerIdentifierJVM

Identity the serializer for the key using a String

public static readonly String KeySerializerIdentifierJVM

Field Value

String

KeyTypeIdentifier

Identity the type of the key used

public const string KeyTypeIdentifier = "key-type"

Field Value

string

KeyTypeIdentifierJVM

Identity the type of the key used using a String

public static readonly String KeyTypeIdentifierJVM

Field Value

String

ValueSerializerIdentifier

Identity the serializer for the value

public const string ValueSerializerIdentifier = "value-serializer-type"

Field Value

string

ValueSerializerIdentifierJVM

Identity the serializer for the value using a String

public static readonly String ValueSerializerIdentifierJVM

Field Value

String

ValueTypeIdentifier

Identity the type of the value used

public const string ValueTypeIdentifier = "value-type"

Field Value

string

ValueTypeIdentifierJVM

Identity the type of the value used using a String

public static readonly String ValueTypeIdentifierJVM

Field Value

String

Methods

DeserializeBoolean(bool, string, byte[])

Deserialize a Boolean

public static bool DeserializeBoolean(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

bool

DeserializeByteArray(bool, string, byte[])

Deserialize a ByteArray

public static byte[] DeserializeByteArray(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

byte[]

DeserializeByteBuffer(bool, string, byte[])

Deserialize a ByteBuffer

public static ByteBuffer DeserializeByteBuffer(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

ByteBuffer

DeserializeBytes(bool, string, byte[])

Deserialize a Bytes

public static Bytes DeserializeBytes(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

Bytes

DeserializeDouble(bool, string, byte[])

Deserialize a Double

public static double DeserializeDouble(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

double

DeserializeFloat(bool, string, byte[])

Deserialize a Float

public static float DeserializeFloat(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

float

DeserializeGuid(bool, string, byte[])

Deserialize a Guid

public static Guid DeserializeGuid(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

Guid

DeserializeInt(bool, string, byte[])

Deserialize a Integer

public static int DeserializeInt(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

int

DeserializeLong(bool, string, byte[])

Deserialize a Long

public static long DeserializeLong(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

long

DeserializeShort(bool, string, byte[])

Deserialize a Short

public static short DeserializeShort(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

short

DeserializeString(bool, string, byte[])

Deserialize a String

public static string DeserializeString(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

string

DeserializeVoid(bool, string, byte[])

Deserialize a Void

public static Void DeserializeVoid(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

Void

InternalJVMSerDesType(Type)

Returns the JVM serializer KNetSerialization.SerializationType for type

public static KNetSerialization.SerializationType InternalJVMSerDesType(Type type)

Parameters

type Type

The Type to check

Returns

KNetSerialization.SerializationType

KNetSerialization.SerializationType

InternalJVMSerDesType<TData>()

Returns the JVM serializer KNetSerialization.SerializationType for TData

public static KNetSerialization.SerializationType InternalJVMSerDesType<TData>()

Returns

KNetSerialization.SerializationType

KNetSerialization.SerializationType

Type Parameters

TData

The type to check

InternalSerDesType(Type)

Returns the serializer KNetSerialization.SerializationType for type

public static KNetSerialization.SerializationType InternalSerDesType(Type type)

Parameters

type Type

The Type to check

Returns

KNetSerialization.SerializationType

KNetSerialization.SerializationType

InternalSerDesType<TData>()

Returns the serializer KNetSerialization.SerializationType for TData

public static KNetSerialization.SerializationType InternalSerDesType<TData>()

Returns

KNetSerialization.SerializationType

KNetSerialization.SerializationType

Type Parameters

TData

The type to check

IsInternalManaged(Type)

Check if a serializer is available for type

public static bool IsInternalManaged(Type type)

Parameters

type Type

The Type to check

Returns

bool

true if managed

IsInternalManaged<TData>()

Check if a serializer is available for TData

public static bool IsInternalManaged<TData>()

Returns

bool

true if managed

Type Parameters

TData

The type to check

IsJVMInternalManaged(Type)

Check if a JVM serializer is available for type

public static bool IsJVMInternalManaged(Type type)

Parameters

type Type

The Type to check

Returns

bool

true if managed

IsJVMInternalManaged<TData>()

Check if a JVM serializer is available for TData

public static bool IsJVMInternalManaged<TData>()

Returns

bool

true if managed

Type Parameters

TData

The type to check

SerializeBoolean(bool, string, bool)

Serialize a Boolean

public static byte[] SerializeBoolean(bool fallbackToKafka, string topic, bool data)

Parameters

fallbackToKafka bool
topic string
data bool

Returns

byte[]

SerializeByteArray(bool, string, byte[])

Serialize a ByteArray

public static byte[] SerializeByteArray(bool fallbackToKafka, string topic, byte[] data)

Parameters

fallbackToKafka bool
topic string
data byte[]

Returns

byte[]

SerializeByteBuffer(bool, string, ByteBuffer)

Serialize a ByteBuffer

public static byte[] SerializeByteBuffer(bool fallbackToKafka, string topic, ByteBuffer data)

Parameters

fallbackToKafka bool
topic string
data ByteBuffer

Returns

byte[]

SerializeBytes(bool, string, Bytes)

Serialize a Bytes

public static byte[] SerializeBytes(bool fallbackToKafka, string topic, Bytes data)

Parameters

fallbackToKafka bool
topic string
data Bytes

Returns

byte[]

SerializeDouble(bool, string, double)

Serialize a Double

public static byte[] SerializeDouble(bool fallbackToKafka, string topic, double data)

Parameters

fallbackToKafka bool
topic string
data double

Returns

byte[]

SerializeFloat(bool, string, float)

Serialize a Float

public static byte[] SerializeFloat(bool fallbackToKafka, string topic, float data)

Parameters

fallbackToKafka bool
topic string
data float

Returns

byte[]

SerializeGuid(bool, string, Guid)

Serialize a Guid

public static byte[] SerializeGuid(bool fallbackToKafka, string topic, Guid data)

Parameters

fallbackToKafka bool
topic string
data Guid

Returns

byte[]

SerializeInt(bool, string, int)

Serialize a Integer

public static byte[] SerializeInt(bool fallbackToKafka, string topic, int data)

Parameters

fallbackToKafka bool
topic string
data int

Returns

byte[]

SerializeLong(bool, string, long)

Serialize a Long

public static byte[] SerializeLong(bool fallbackToKafka, string topic, long data)

Parameters

fallbackToKafka bool
topic string
data long

Returns

byte[]

SerializeShort(bool, string, short)

Serialize a Short

public static byte[] SerializeShort(bool fallbackToKafka, string topic, short data)

Parameters

fallbackToKafka bool
topic string
data short

Returns

byte[]

SerializeString(bool, string, string)

Serialize a String

public static byte[] SerializeString(bool fallbackToKafka, string topic, string data)

Parameters

fallbackToKafka bool
topic string
data string

Returns

byte[]

SerializeVoid(bool, string, Void)

Serialize a Void

public static byte[] SerializeVoid(bool fallbackToKafka, string topic, Void data)

Parameters

fallbackToKafka bool
topic string
data Void

Returns

byte[]

ToAssemblyQualified(Type)

Returns the typename with the assembly qualification to help reload better the types

public static string ToAssemblyQualified(this Type type)

Parameters

type Type

The Type to be converted

Returns

string

A string with FullName along with FullName