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
KeySerializerIdentifierJVM
Identity the serializer for the key using a String
public static readonly String KeySerializerIdentifierJVM
Field Value
KeyTypeIdentifier
Identity the type of the key used
public const string KeyTypeIdentifier = "key-type"
Field Value
KeyTypeIdentifierJVM
Identity the type of the key used using a String
public static readonly String KeyTypeIdentifierJVM
Field Value
ValueSerializerIdentifier
Identity the serializer for the value
public const string ValueSerializerIdentifier = "value-serializer-type"
Field Value
ValueSerializerIdentifierJVM
Identity the serializer for the value using a String
public static readonly String ValueSerializerIdentifierJVM
Field Value
ValueTypeIdentifier
Identity the type of the value used
public const string ValueTypeIdentifier = "value-type"
Field Value
ValueTypeIdentifierJVM
Identity the type of the value used using a String
public static readonly String ValueTypeIdentifierJVM
Field Value
Methods
DeserializeBoolean(bool, string, byte[])
Deserialize a Boolean
public static bool DeserializeBoolean(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeByteArray(bool, string, byte[])
Deserialize a ByteArray
public static byte[] DeserializeByteArray(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
- byte[]
DeserializeByteBuffer(bool, string, byte[])
Deserialize a ByteBuffer
public static ByteBuffer DeserializeByteBuffer(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeBytes(bool, string, byte[])
Deserialize a Bytes
public static Bytes DeserializeBytes(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeDouble(bool, string, byte[])
Deserialize a Double
public static double DeserializeDouble(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeFloat(bool, string, byte[])
Deserialize a Float
public static float DeserializeFloat(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeGuid(bool, string, byte[])
Deserialize a Guid
public static Guid DeserializeGuid(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeInt(bool, string, byte[])
Deserialize a Integer
public static int DeserializeInt(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeLong(bool, string, byte[])
Deserialize a Long
public static long DeserializeLong(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeShort(bool, string, byte[])
Deserialize a Short
public static short DeserializeShort(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeString(bool, string, byte[])
Deserialize a String
public static string DeserializeString(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
DeserializeVoid(bool, string, byte[])
Deserialize a Void
public static Void DeserializeVoid(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
InternalJVMSerDesType(Type)
Returns the JVM serializer KNetSerialization.SerializationType for type
public static KNetSerialization.SerializationType InternalJVMSerDesType(Type type)
Parameters
Returns
InternalJVMSerDesType<TData>()
Returns the JVM serializer KNetSerialization.SerializationType for TData
public static KNetSerialization.SerializationType InternalJVMSerDesType<TData>()
Returns
Type Parameters
TData
The type to check
InternalSerDesType(Type)
Returns the serializer KNetSerialization.SerializationType for type
public static KNetSerialization.SerializationType InternalSerDesType(Type type)
Parameters
Returns
InternalSerDesType<TData>()
Returns the serializer KNetSerialization.SerializationType for TData
public static KNetSerialization.SerializationType InternalSerDesType<TData>()
Returns
Type Parameters
TData
The type to check
IsInternalManaged(Type)
Check if a serializer is available for type
public static bool IsInternalManaged(Type type)
Parameters
Returns
IsInternalManaged<TData>()
Check if a serializer is available for TData
public static bool IsInternalManaged<TData>()
Returns
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
Returns
IsJVMInternalManaged<TData>()
Check if a JVM serializer is available for TData
public static bool IsJVMInternalManaged<TData>()
Returns
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
Returns
- byte[]
SerializeByteArray(bool, string, byte[])
Serialize a ByteArray
public static byte[] SerializeByteArray(bool fallbackToKafka, string topic, byte[] data)
Parameters
Returns
- byte[]
SerializeByteBuffer(bool, string, ByteBuffer)
Serialize a ByteBuffer
public static byte[] SerializeByteBuffer(bool fallbackToKafka, string topic, ByteBuffer data)
Parameters
fallbackToKafka
booltopic
stringdata
ByteBuffer
Returns
- byte[]
SerializeBytes(bool, string, Bytes)
Serialize a Bytes
public static byte[] SerializeBytes(bool fallbackToKafka, string topic, Bytes data)
Parameters
Returns
- byte[]
SerializeDouble(bool, string, double)
Serialize a Double
public static byte[] SerializeDouble(bool fallbackToKafka, string topic, double data)
Parameters
Returns
- byte[]
SerializeFloat(bool, string, float)
Serialize a Float
public static byte[] SerializeFloat(bool fallbackToKafka, string topic, float data)
Parameters
Returns
- byte[]
SerializeGuid(bool, string, Guid)
Serialize a Guid
public static byte[] SerializeGuid(bool fallbackToKafka, string topic, Guid data)
Parameters
Returns
- byte[]
SerializeInt(bool, string, int)
Serialize a Integer
public static byte[] SerializeInt(bool fallbackToKafka, string topic, int data)
Parameters
Returns
- byte[]
SerializeLong(bool, string, long)
Serialize a Long
public static byte[] SerializeLong(bool fallbackToKafka, string topic, long data)
Parameters
Returns
- byte[]
SerializeShort(bool, string, short)
Serialize a Short
public static byte[] SerializeShort(bool fallbackToKafka, string topic, short data)
Parameters
Returns
- byte[]
SerializeString(bool, string, string)
Serialize a String
public static byte[] SerializeString(bool fallbackToKafka, string topic, string data)
Parameters
Returns
- byte[]
SerializeVoid(bool, string, Void)
Serialize a Void
public static byte[] SerializeVoid(bool fallbackToKafka, string topic, Void data)
Parameters
Returns
- byte[]
ToAssemblyQualified(Type)
Returns the typename with the assembly qualification to help reload better the types
public static string ToAssemblyQualified(this Type type)