Interface IBinary
Defines binary objects functionality. With binary objects you are able to:
- Seamlessly interoperate between Java, .NET, and C++.
- Make any object binary with zero code change to your existing code.
- Nest binary objects within each other.
- Automatically handle circularornullreferences.
- Automatically convert collections and maps between Java, .NET, and C++.
- Optionally avoid deserialization of objects on the server side.
- Avoid need to have concrete class definitions on the server side.
- Dynamically change structure of the classes without having to restart the cluster.
- Index into binary objects for querying purposes.
Namespace: Apache.Ignite.Core.Binary
Assembly: Apache.Ignite.Core.dll
Syntax
public interface IBinaryMethods
BuildEnum(String, Int32)
Converts enum to a binary form.
Declaration
IBinaryObject BuildEnum(string typeName, int value)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | typeName | Enum type name. | 
| System.Int32 | value | Enum int value. | 
Returns
| Type | Description | 
|---|---|
| IBinaryObject | Binary representation of the specified enum value. | 
BuildEnum(String, String)
Converts enum to a binary form.
Declaration
IBinaryObject BuildEnum(string typeName, string valueName)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | typeName | Enum type name. | 
| System.String | valueName | Enum value name. | 
Returns
| Type | Description | 
|---|---|
| IBinaryObject | Binary representation of the specified enum value. | 
BuildEnum(Type, Int32)
Converts enum to a binary form.
Declaration
IBinaryObject BuildEnum(Type type, int value)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | type | Enum type. | 
| System.Int32 | value | Enum int value. | 
Returns
| Type | Description | 
|---|---|
| IBinaryObject | Binary representation of the specified enum value. | 
BuildEnum(Type, String)
Converts enum to a binary form.
Declaration
IBinaryObject BuildEnum(Type type, string valueName)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | type | Enum type. | 
| System.String | valueName | Enum value name. | 
Returns
| Type | Description | 
|---|---|
| IBinaryObject | Binary representation of the specified enum value. | 
GetBinaryType(Int32)
Gets metadata for specified type id.
Declaration
IBinaryType GetBinaryType(int typeId)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | typeId | 
Returns
| Type | Description | 
|---|---|
| IBinaryType | Metadata. | 
GetBinaryType(String)
Gets metadata for specified type name.
Declaration
IBinaryType GetBinaryType(string typeName)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | typeName | 
Returns
| Type | Description | 
|---|---|
| IBinaryType | Metadata. | 
GetBinaryType(Type)
Gets metadata for specified type.
Declaration
IBinaryType GetBinaryType(Type type)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | type | 
Returns
| Type | Description | 
|---|---|
| IBinaryType | Metadata. | 
GetBinaryTypes()
Gets metadata for all known types.
Declaration
ICollection<IBinaryType> GetBinaryTypes()Returns
| Type | Description | 
|---|---|
| ICollection<IBinaryType> | Metadata. | 
GetBuilder(IBinaryObject)
Create builder over existing binary object.
Declaration
IBinaryObjectBuilder GetBuilder(IBinaryObject obj)Parameters
| Type | Name | Description | 
|---|---|---|
| IBinaryObject | obj | 
Returns
| Type | Description | 
|---|---|
| IBinaryObjectBuilder | Builder. | 
GetBuilder(String)
Create builder for the given binary object type name.
Declaration
IBinaryObjectBuilder GetBuilder(string typeName)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | typeName | Type name. | 
Returns
| Type | Description | 
|---|---|
| IBinaryObjectBuilder | Builder. | 
GetBuilder(Type)
Create builder for the given binary object type. Note that this type must be specified in BinaryConfiguration.
Declaration
IBinaryObjectBuilder GetBuilder(Type type)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | type | 
Returns
| Type | Description | 
|---|---|
| IBinaryObjectBuilder | Builder. | 
GetTypeId(String)
Gets type id for the given type name.
Declaration
int GetTypeId(string typeName)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | typeName | Type name. | 
Returns
| Type | Description | 
|---|---|
| System.Int32 | Type id. | 
RegisterEnum(String, IEnumerable<KeyValuePair<String, Int32>>)
Registers enum type.
Declaration
IBinaryType RegisterEnum(string typeName, IEnumerable<KeyValuePair<string, int>> values)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | typeName | Name of the type. | 
| IEnumerable<KeyValuePair<System.String, System.Int32>> | values | Mapping of enum value names to int values. | 
Returns
| Type | Description | 
|---|---|
| IBinaryType | Binary type for registered enum. | 
ToBinary<T>(Object)
Converts provided object to binary form.
Note that object's type needs to be configured in BinaryConfiguration.
Declaration
T ToBinary<T>(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | obj | Object to convert. | 
Returns
| Type | Description | 
|---|---|
| T | Converted object. | 
Type Parameters
| Name | Description | 
|---|---|
| T |