public class ClientBinary extends Object implements IgniteBinary
IgniteBinary.| Modifier and Type | Method and Description |
|---|---|
BinaryContext |
binaryContext() |
BinaryObject |
buildEnum(String typeName,
int ord)
Create enum object using value.
|
BinaryObject |
buildEnum(String typeName,
String name)
Create enum object using name.
|
BinaryObjectBuilder |
builder(BinaryObject binaryObj)
Creates binary builder initialized by existing binary object.
|
BinaryObjectBuilder |
builder(String typeName)
Creates new binary builder.
|
BinaryType |
registerClass(Class<?> cls)
Register binary type for specified class.
|
BinaryType |
registerEnum(String typeName,
Map<String,Integer> vals)
Register enum type.
|
<T> T |
toBinary(Object obj)
Converts provided object to instance of
BinaryObject. |
BinaryType |
type(Class<?> cls)
Gets metadata for provided class.
|
BinaryType |
type(int typeId)
Gets metadata for provided type ID.
|
BinaryType |
type(String typeName)
Gets metadata for provided class name.
|
int |
typeId(String typeName)
Gets type ID for given type name.
|
Collection<BinaryType> |
types()
Gets metadata for all known types.
|
public int typeId(String typeName)
BinaryIdMapper is configured
via BinaryConfiguration, then system mapper will be used.typeId in interface IgniteBinarytypeName - Type name.public <T> T toBinary(Object obj)
BinaryObject.toBinary in interface IgniteBinaryT - Type of the binary object.obj - Object to convert.null if obj is null.public BinaryObjectBuilder builder(String typeName)
builder in interface IgniteBinarytypeName - Type name.public BinaryObjectBuilder builder(BinaryObject binaryObj)
builder in interface IgniteBinarybinaryObj - Binary object to initialize builder.public BinaryType type(Class<?> cls) throws BinaryObjectException
type in interface IgniteBinarycls - Class.BinaryObjectException - In case of error.public BinaryType type(String typeName)
type in interface IgniteBinarytypeName - Type name.public BinaryType type(int typeId)
type in interface IgniteBinarytypeId - Type ID.public Collection<BinaryType> types()
types in interface IgniteBinarypublic BinaryObject buildEnum(String typeName, int ord)
buildEnum in interface IgniteBinarytypeName - Type name.ord - Ordinal.public BinaryObject buildEnum(String typeName, String name)
buildEnum in interface IgniteBinarytypeName - Type name.name - Name.public BinaryType registerEnum(String typeName, Map<String,Integer> vals)
registerEnum in interface IgniteBinarytypeName - Type name.vals - Mapping of enum constant names to ordinals.public BinaryType registerClass(Class<?> cls) throws BinaryObjectException
registerClass in interface IgniteBinarycls - Class.BinaryObjectException - In case of error.public BinaryContext binaryContext()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023